SAN JOSE, Calif. — T.J. Oshie had the puck alone in the slot, just the goaltender in front of him. It looked like a shootout, what the Washington Capitals forward is best known for, and as he skated up to San Jose Sharks goaltender Martin Jones, he moved the puck from his forehand to his backhand and back again before tucking it through Jones’s legs.

He twirled the blade of his stick and then pumped a fist triumphantly, scoring the 500th point of his career with flare. Linemates Jakub Vrana and Nicklas Backstrom flanked Oshie in a celebratory hug. Oshie’s second goal of the game gave the Capitals a three-goal cushion in the second period en route to a 5-1 win, especially impressive considering the Sharks have been one of the best teams in the league this season.

This victory was delivered by Washington’s best players, its top-six forward corps, and in particular the second line of Oshie, Vrana and Backstrom, which accounted for three of the team’s five goals. Backstrom and Vrana finished with two points while Oshie tallied three, and he now has 16 points in the past 13 games. With 18 goals, Oshie has already matched his total through 74 games last season.

The Capitals started this six-game trip, their longest of the season, with a 3-0 loss in Columbus on Tuesday night, and Washington players acknowledged that they were handily outplayed. The 7-8-4 mark for this calendar year that the Capitals entered Thursday night’s game with was the worst of teams still in a playoff spot, and though Washington was still in second place in the Metropolitan Division, other teams were gaining ground with games in hand.

The Capitals have traditionally struggled in San Jose, but a 2-0 win here last season sparked the team’s turnaround down the stretch and into the playoffs. As Washington put together one of its more complete efforts on Thursday, this game felt like it could have the same sort of impact going forward, potentially snapping the Capitals out of their midseason funk for good.

Things started poorly with Kevin Labanc finishing a Joe Thornton pass on a rush just 2:06 into the game, putting Washington down early, but the Capitals responded quickly. Sharks captain Joe Pavelski was tripped defenseman Dmitry Orlov in San Jose’s offensive zone, and Washington scored just 11 seconds into the power play. Jones stopped Alex Ovechkin’s one-timer from the left faceoff circle, but Oshie collected the rebound at Jones’s pads, and his shot banked off Marc-Edouard Vlasic before crossing the goal line to tie the game just 1:23 after the Sharks’ goal.

That marked Oshie’s 17th goal of the season, and he added a primary assist 11:33 into the game, when he set up Vrana on a three-on-two rush. Vrana’s first shot went into defenseman Brent Burns’s skates, but he punched the rebound past Jones to lift the Capitals to a 2-1 lead. That’s his 18th goal of the season, putting the 22-year-old on pace for a 25-goal campaign. Washington tallied 15 shots in the first period, more than doubling its total through 40 minutes in Columbus.

The Capitals scored a third unanswered goal less than five minutes into the second, when Tom Wilson entered the zone with speed, relaying the puck to center Evgeny Kuznetsov, whose seam pass set up Ovechkin’s laser from the left faceoff circle. Then with less than two minutes left in the frame, Vrana created the turnover that led to Oshie’s partial breakaway in the slot and his second goal.

Since he was traded to Washington before the 2015-16 season, Oshie has been one of the Capitals’ most versatile forwards. Responsible defensively, he and Backstrom work as a shutdown duo for the team, often matched against opponent’s top forwards. But he also plays on the top power play, posted in the slot, where he’s key to the unit’s puck retrievals, and he also kills penalties.

With Washington taking the 4-1 lead into the third period, San Jose managed just 26 shots on goal, recording just three before Jones was pulled for an extra attacker with roughly five minutes left in the game. Goaltender Braden Holtby finished with 25 saves, and he’s been especially stout since the team returned from its bye week at the start of the month, allowing more than two goals in a game just twice. He got some help on Thursday with the Capitals taking just one penalty for the game, significant for the club that’s been leading in minor infractions this season.

isabelle.khurshudyan@washpost.com

twitter.com/ikhurshudyan