Lars Eller scores the game-winning goal. (John McDonnell/The Washington Post)

LAS VEGAS – They had done it throughout the postseason, so it was only fitting that a cast of unsung heroes was at the forefront of the Washington Capitals’ Stanley Cup-clinching 4-3 victory over the Vegas Golden Knights in Game 5 on Thursday night.

There was rookie Jakub Vrana, who was without a goal on 28 shots over his past 12 games, opening the scoring on a breakaway. There was Devante Smith-Pelly, who had seven goals in the regular season, tying the score in the third period with his seventh postseason goal.

And, finally, there was Lars Eller, who was so instrumental in helping the Capitals endure injuries to star centers Nicklas Backstrom and Evgeny Kuznetsov over the past two months, sneaking behind Vegas goaltender Marc-Andre Fleury and scoring the winning goal late in the third period.

Their stars carried the Capitals throughout the playoffs — and in the second period Thursday, captain Alex Ovechkin set a franchise record with his 15th goal of the postseason — but this unlikely run wouldn’t have been possible without contributions coming from up and down the lineup.

“This team deserved it,” Eller said. “It’s an unbelievable feeling.”

On Thursday night, it began with Vrana. It had been more than a month since he had scored — a pivotal goal in Game 5 of the Pittsburgh series — so the rookie didn’t hesitate when he saw an opening, using his game-changing speed to blow past two Vegas defenders, corral a pass from Tom Wilson and beat Fleury top shelf at 6:24 of the second period.

Smith-Pelly, who had scored in Games 3 and 4, had hit a snag in his career last summer, when he signed a one-year, two-way deal worth the NHL minimum. Yet he played up and down the lineup over 75 games in the regular season and delivered in the most important moment of his career Thursday, when he came up with another pivotal score with Vegas leading 3-2 with about 10 minutes remaining. He discovered a loose puck in front of the net and found the net while falling to the ice.

“We know that, if any team that has been successful, the bottom guys are going to have to be a part of it,” Smith-Pelly said.

Eller scored five points over the four games that Backstrom missed because of an injury earlier in the postseason, and he came up with a goal and two primary assists in the Game 2 victory; Kuznetsov left that game with an injury. He didn’t need to plug a hole Thursday, but he again settled into his role and muscled his way to a game-changing goal. After Brett Connolly had fired a shot at Fleury, the puck sneaked through him and came to rest in the crease; Eller finished it off to put the Capitals up 4-3 with 7:37 remaining.

These were the kind of contributions that the unheralded pieces of Washington’s roster had made all offseason. It was Chandler Stephenson, who didn’t even make the team out of training camp, scoring a decisive goal in the first round against Columbus. It was Alex Chiasson getting the first goal in the clinching Game 6 over rival Pittsburgh in the second round.

It was Jay Beagle finding Smith-Pelly for a crucial late goal in Game 6 of the Eastern Conference finals against Tampa Bay that tied that series and eventually led to Washington’s path to its first Stanley Cup finals appearance since 1998. After the series against the Lightning had been clinched, Washington Coach Barry Trotz made sure all of the team gathered for a picture on the ice, because he wanted his players to remember how they had changed the complexion of this season.

As tradition dictates, Washington’s stars took turns passing around the Stanley Cup after Thursday night’s win. Eller was the ninth player to skate with the trophy, six spots ahead of Smith-Pelly and eight ahead of Vrana, but it hardly mattered. Eller had scored the winning goal, and it was worth the wait.

“It’s like you get to write the end of the best story yourself, scoring the game-winner in the Stanley Cup final,” Eller said, “I don’t know how it can get better than that.”

More on the Stanley Cup-winning Capitals:

Live updates from the celebration in the streets of the District and around the region

Barry Svrluga: Alex Ovechkin claims the Stanley Cup and secures his legacy

Thomas Boswell: For the Capitals and their fans, tears of joy replace years of frustration

The Capitals in Vegas, their fans back in Washington celebrate a victory decades in the making