The Washington Capitals never believe they’re out of a game. On Sunday, they showed why.

Lars Eller scored with 2:59 remaining in overtime after the Capitals rallied from two goals down in the final minute of regulation, completing a stunning 5-4 victory over the San Jose Sharks.

T.J. Oshie tied the game with 15 seconds left. Eller also assisted Jakub Vrana’s second goal of the game with 47 seconds remaining as the NHL-leading Capitals became just the seventh team in league history to win after trailing by two inside the final minute.

“We just keep working,” Oshie said. “We’ve got everyone tugging the rope. And when you have that, it’s fun.”

Evander Kane had his third career hat trick for San Jose, which never trailed before Eller's game-winner.

“That’s why they lead the league and that’s why they have the most points,” said Sharks coach Bob Boughner, “because they find ways to win games. As disappointed as I am, I’m pretty content in how our 5-on-5 game looks.”

Logan Couture scored an empty-netter with a minute remaining, appearing to seal the game. But Capitals coach Todd Reirden left the net empty, and Washington responded with its sixth and seventh goals of the season when playing in 6-on-5 situations.

“We have a plan,” Reirden said of those late-game successes. “We believe in those players. They are players that are not fazed by pressure. They’re anxious to get out there and try to be the guys that tie up the game.”

Nic Dowd had a second-period goal for Washington. Braden Holtby made 25 saves to snap a three-game losing streak in net and picked up an assist on Eller’s decisive goal, pushing the puck up ice to John Carlson.

From there, Carlson sent a cross-ice pass to Eller, who rifled his shot beyond Martin Jones and inside the right post.

“That was one of the wildest games I’ve played,” Eller said.

Jones stopped 24 shots, Couture also had an assist and Timo Meier had two, but San Jose was still swept by Washington in the season series in unlikely fashion.

Kane’s three goals — all in the second period — gave him a team-leading 18 for the Sharks, who fell to 2-2 on their last five-game trip of the season.

Couture’s insurance tally looked like it would be enough for victory. But Vrana answered only 13 seconds later, assisted by Eller and Radko Gudas. Then Oshie leveled the game from in close on Evgeny Kuznetsov's feed.

“We were the better team I thought for most of the game,” Kane said. “We’ve got to look at the positives. It’s easy to look at the negatives.”

NOTES: Kane scored all three goals in one period — the first — in his other hat trick this season, which came in a 5-2 win over the Carolina Panthers on Oct. 16. ... Sunday marked the 10-year anniversary of Alex Ovechkin being named Washington's captain. He's the second-longest-tenured captain in team history behind Rod Langway (Oct. 5, 1982 to Feb. 9, 1993.) ... Ovechkin saw his points streak end at five games. ... San Jose's Barclay Goodrow had an apparent opening goal disallowed 1:14 into the second period. He was ruled to have touched the puck with a high stick.

UP NEXT

Sharks: Finish their trip at St. Louis on Tuesday.

Capitals: Host Ottawa on Tuesday.