Las Vegas • After 43 seasons, the Washington Capitals are finally sitting on top of hockey.

Lars Eller scored the tiebreaking goal with 7:37 to play, and the Capitals raised the Stanley Cup for the first time in franchise history after a 4-3 victory over the Vegas Golden Knights in Game 5 on Thursday night.

Captain Alex Ovechkin capped his playoff MVP campaign with a power-play goal, and Devante Smith-Pelly tied it with a full-stretch goal midway through the final period of the Capitals’ fourth consecutive victory over the Golden Knights, whose incredible expansion season finally ended in the desert.

So did the Capitals’ agonizing wait for their first championship since the franchise’s debut in 1974. After so many years of crushing disappointment for a team with a lengthy history of postseason failure, these Capitals confidently won their fourth consecutive closeout game with a tenacious third-period comeback in Vegas.

Ovechkin and his teammates are Washington’s first championship hockey team — and their city’s first champion in a major pro sport since the football team won the Super Bowl in early 1992.

“We did it,” said Ovechkin, whose 15 playoff goals set a franchise record. “That’s all that matters. Look at the smiles on my teammates. This is something you’ll never forget. This moment, I’ll remember for the rest of my life. I’m so happy. It’s unbelievable.”

After Ovechkin accepted the Conn Smythe Trophy, he received the Cup from NHL Commissioner Gary Bettman. Ovechkin shouted “Yeah! Yeah! Yeah!” through his gap-toothed grin before skating away and hoisting the prize over his head for a victory lap in front of thousands of red-clad fans.

When Ovi got the Cup back, he handed it to Ted Leonsis, the Caps’ owner since 1999.

“I’m so happy for the group that has gone through the misery,” said Washington coach Barry Trotz, a first-time champ in his 19th season behind an NHL bench.

After Vegas won the Final opener, the Capitals capped their four-game surge by rallying from a third-period deficit in this cathartic Game 5, banishing any memory of playoff failure with clutch goals and rugged play across their lineup.

Braden Holtby made 28 saves in Game 5, outplaying three-time Stanley Cup champion Marc-Andre Fleury in the other net one final time.

“When you get this close to the Cup, it’s hard,” Fleury said. “Doesn’t happen too often. It’s very disappointing.”

The Caps couldn’t win a Cup without a little late weirdness, however: The game clock stopped working on the T-Mobile Arena scoreboards during the final minutes, and the Capitals angrily protested while they played on. Vegas never got close to a tying goal, and the clock finally hit zeros, allowing the Caps to storm the ice behind their net for a frenzied celebration.

Reilly Smith scored a go-ahead goal late in the second period for the Golden Knights, who won seven of their first eight home playoff games before dropping the last two.

The defeat ends the incredible inaugural season of the Golden Knights, who became the NHL’s 31st franchise last fall and immediately launched into arguably the greatest debut in modern pro sports history.

Nate Schmidt and David Perron also scored for Vegas in the second period, but Fleury’s 29 saves included a stopped puck that dropped underneath him where Eller could sweep it home for the Cup-winning goal.

“It means everything,” Eller said. “You couldn’t write the story better. If you’re going to win on the road, I couldn’t imagine a better place to do it.”

Forward T.J. Oshie spent a moment in the celebration looking up for his father, Tim, who he said was recently diagnosed with Alzheimer’s disease.

“He doesn’t remember a lot of stuff, but he’s going to remember this,” Oshie said. “I’ve never seen a team come together like we did here. I’ve never seen the commitment from start to finish like we had here.”

Washington’s win was its 10th on the road in this postseason, tying the NHL playoff record and illustrating the superior toughness of this team. While past editions of the Caps created their team’s reputation for postseason flops in part by losing five playoff series in which they had won three of the first four games, Ovechkin’s latest group promptly closed out all four of its series this year on the very first try.

The Caps also came back from series deficits in all four rounds and clinched all four series on the road.

The remarkable Golden Knights hadn’t lost four consecutive games in their entire inaugural season before the Caps rolled them.

The Capitals had thousands of fans in the Vegas crowd and a building full of supporters watching back home along with countless thousands outside in the crowded D.C. streets. They got a barn-burner of a finale befitting this thrilling series, with wild shifts of momentum before that bizarre clock incident that didn’t appear to affect the outcome.

Ovechkin, who turns 33 later this year, has been among the most exciting and productive players in his sport since joining the Caps in 2005. Yet for all of his goal-scoring prowess and athletic swagger, the Great Eight had never won an Olympic gold medal or a Stanley Cup title.

But after becoming the fifth player in the last quarter-century to score at least 15 goals in a postseason, Ovechkin is a champion at last. He also became the first Russian captain to raise the Cup in NHL history.

Ovechkin is the 16th player in NHL history to wait at least 1,000 regular-season games before raising the Stanley Cup for the first time. Only two did it with just one team: Ovi and Detroit’s Steve Yzerman.

The title is also validation for Holtby, who has spent his entire NHL career in Washington. After several seasons of being measured unfavorably against Fleury and other goaltending greats despite his 2016 Vezina Trophy, the Saskatchewan native also has his long-sought ring — and his unbelievable stick save on Alex Tuch in Game 2 will ring forever in Caps history.

Shortly after Jakub Vrana scored the opening goal of Game 5 on a breakaway early in the second, Schmidt tied it when his fling toward the net deflected off a stick and again off Caps defenseman Matt Niskanen’s skate. Vegas’ Brayden McNabb took a penalty just 11 seconds later, and Ovechkin set up in his customary spot in the left faceoff circle to put Nicklas Backstrom’s cross-ice pass into a sliver of open net.

Perron battled with Washington’s Christian Djoos in the crease moments later and eventually ended up inside Holtby’s net while Tomas Tatar’s shot glanced off him and in. The Caps challenged for goalie interference, but were denied.

And with Ovechkin in the penalty box for tripping in the final minute of the wild second period, Smith scored into a mostly open net after controlling a pass from Alex Tuch. The teams then engaged in a brawl behind the net, reflecting the unbearable tension with the Cup on the line.

Washington pressed early in the third, but didn’t connect until Brooks Orpik created a chance by stopping the puck at the blue line and flinging it to the net against the run of play. Smith-Pelly barely controlled the puck and stretched out to fling it toward the net while falling face-forward, and it slipped inside Fleury’s post for the veteran forward’s seventh goal of the postseason — matching his total from the entire regular season.

“I’ve been dreaming about it since I was a little kid,” Smith-Pelly said. “The team, with so much change, you didn’t know what to expect. We knew we could do something special, and we did.”

Moments later, the Knights struggled to keep up with the Caps’ puck movement and Brett Connolly open for a shot. Fleury stopped it, but the puck fell to the ice underneath him — and Eller fought off Luca Sbisa and slapped the puck into the net for his seventh goal of the postseason.

STANLEY CUP

(Best-of-7)

Washington 4, Vegas 1

Monday, May 28: Vegas 6, Washington 4

Wednesday, May 30: Washington 3, Vegas 2

Saturday, June 2: Washington 3, Vegas 1

Monday, June 4: Washington 6, Vegas 2

Thursday, June 7: Washington 4, Vegas 3