The Vegas Golden Knights, born out of trepidation, tragedy and ultimately triumph, won their first Stanley Cup in just their sixth season, beating the Florida Panthers, 9-3, at T-Mobile Arena in Las Vegas on Tuesday.

The Knights, the top seed in the Western Conference, used a high-speed, sharp-elbowed attack to overwhelm the Panthers, the eighth seed in the Eastern Conference, in five games. The Knights were making their second appearance in the finals, the same as the Panthers.

But while the Panthers came within one round of a championship for the first time since 1996, the Knights made the second-fastest trip to a Stanley Cup victory by any team in the expansion era that began in 1967, trailing only the Edmonton Oilers, who won the Cup in their fifth season in the league. (The Oilers played seven seasons in the World Hockey Association before joining the N.H.L.)

“We waited a lot of time for that moment to come back and we wanted to make sure we cashed in,” said Vegas winger Jonathan Marchessault, who was selected from the Panthers in the expansion draft and was one of the original “misfits” from Vegas’ inaugural season. “This team has been unbelievable since the beginning.”

After the captain Mark Stone hoisted the Cup after the game, he handed it off to Reilly Smith, who is another player from the first season and also came from the Panthers. He passed it to Marchessault, who won the Conn Smythe Trophy as most valuable player in the playoffs.

After a shaky start to Game 5, the Golden Knights opened the scoring about 12 minutes into the first period. After Vegas goalie Adin Hill stopped Florida center Aleksander Barkov, Stone scored an unassisted short-handed goal. Vegas scored again less than two minutes later.

In the second period, Vegas scored four times in less than 10 minutes, including a second goal by Stone, to build an insurmountable lead. The Panthers were playing without their leading scorer, Matthew Tkachuk, who was injured in Game 4. But Vegas was clearly the hungrier team.

The Knights fans, fueled by a raucous in-house D.J., cheerleaders and an over-the-top light show, spent the third period preparing for a full-throated celebration that few imagined just six years ago.

The annals of the N.H.L. are littered with failed franchises. Expansion clubs. Teams that moved to new markets. Teams that moved again. Remember the Cleveland Barons? The Kansas City Scouts? The Minnesota North Stars?

So it’s no wonder critics were skeptical when, in 2016, Commissioner Gary Bettman held a news conference at a hotel in Las Vegas to announce that the city would be home to the Golden Knights, the league’s 31st team. With the temperature outside peaking at 108 degrees, Bettman fielded questions about the viability of a professional hockey team in a desert city where many residents are retirees or work in service jobs at night.

A host of minor league hockey teams — including the Gamblers, the Outlaws, the Aces, the Thunder and the Ice Dice — have struggled in Las Vegas. The Coyotes, who relocated to Arizona from Winnipeg for the 1996-97 season, were in such bad financial shape that the N.H.L. had to take over the team at one point. Maybe hockey wasn’t meant to be played in the desert.

Still, Bettman pointed to the city’s growing population and its reputation for entertainment.

“We think this is a tremendously exciting opportunity not just for Las Vegas but for the league as well,” he said.

There were also questions about adding a franchise in a city known for legal sports gambling, something sports leagues, the N.H.L. included, had long shunned. Bettman said betting on hockey wasn’t as popular as it was on football, so the threat that players would throw a game was minimal.

“We don’t worry about the integrity of our game,” Bettman said.

As it turned out, Bettman should have put money down on the team before it took the ice for the first time. The Knights overcame seemingly every obstacle thrown at them in their inaugural season. They sold more than 14,000 season tickets before the team even had a name. The team moved into T-Mobile Arena, which was already open on the Strip.

But after the team’s final preseason game, a gunman in the Mandalay Bay hotel, a mile or so south of the arena, opened fire on a concert nearby, killing 58 people and wounding hundreds of others. The team’s players, who were supposed to have appeared at a public rally the next day, became a galvanizing force in the city. They fanned out across the community, thanking police officers, giving blood and donating tens of thousands of dollars to help victims, their families and emergency medical workers.

Their response endeared them to the city’s stunned and grieving residents. And remarkably, the Knights went on an epic run. Led by the three-time Stanley Cup champion Marc-Andre Fleury in goal, the team began the season as 500-to-1 long shots to win the Stanley Cup. Yet they collected 109 points and a .622 winning percentage in the regular season, both league records for a team in its first season by wide margins. They raced through the first three rounds of the playoffs, beating the Los Angeles Kings, the San Jose Sharks and the Winnipeg Jets, and won the first game of the Stanley Cup finals against the Washington Capitals. The team lost the next four games and the series, but it had made its mark like no one else.

“The team wrapped themselves around the town, and the town wrapped themselves around the team,” Brad Kreel, a longtime Las Vegas resident, told me before the team’s final game that season.

The W.N.B.A.’s Aces came from San Antonio in 2018, the Raiders arrived from Oakland, Calif., a couple of years later, and now the Athletics are trying to find a stadium in the city, too, validating the N.H.L.’s hunch that the city, despite being the 40th-largest media market in the U.S. could support big-time sports teams.

The Knights, though, are now fixtures. They have made the playoffs in five of their six seasons, and despite the long odds, have showed the sports world that Las Vegas can support a pro sports team, and that team can succeed.

“It’s the best feeling in the world,” Vegas center Jack Eichel said. “It’s a really special organization and I just feel blessed to be a part of it. I started to really enjoy coming to the rink again.”

Marchessault, asked what kind of a party Las Vegas was in store for, said with a grin, “I don’t know. Probably a big one.”