T.J. Oshie, right, celebrates his milestone moment with linemate Jakub Vrana as the Capitals scored a big win in the second game of a six-game road trip. (Stan Szeto/Usa Today Sports)

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 triumphant fist, celebrating 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 own one of the best records in the league.

“It just seemed like from the drop of the puck, guys were excited to play,” Oshie said. “Guys were just happy and having fun, and if anyone knows anything about this team, we play our best when we’re having fun.”

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 now has 16 points in the past 13 games. With 18 goals, Oshie has matched his total in 74 games last season.

“He did a really good job tonight, I thought, of establishing that we had to put pucks behind their defense,” Coach Todd Reirden said. “I thought his puck management tonight was one of the better ones it’s been for him, and it kind of set the tone for our whole team, that we didn’t need to try to make plays at the blue line, we needed to put pucks behind them and forecheck and we were able to have success doing that.”

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 took into Thursday night’s game 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 heading into the playoffs. As Washington put together one of its more complete efforts 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.

“It was a really detailed effort and a stingy effort by our forwards tonight,” defenseman Matt Niskanen said. “I think they were really good. They pressured from behind, and they really took away their defense, the way the shoot the puck from the point. I think they got big in the lanes and forced a lot of pucks wide.”

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 and then pulled away. Sharks captain Joe Pavelski 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 was Oshie’s 17th goal, 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. It was 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 and relayed 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, 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 a 4-1 lead into the third period, San Jose managed just five shots on goal, recording three before Jones was pulled for an extra attacker with roughly five minutes left in the game. Goaltender Braden Holtby finished with 24 saves, and he has 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.

“I think that was one of our better outings in the third,” Holtby said. “Going into the third with a lead, I thought we did a really good job of just simplifying and getting the puck in. Something we’ve struggled with all year is feeling like we need more goals when you really just eat out the clock, and it’s one of those things that we’ve improved. Tonight, I thought, was the best we’ve been at that.”