TAMPA, Fla. — With the clock ticking on their time together, the defending champion Tampa Bay Lightning talked about what they already knew was their last Stanley Cup run as a group.

They talked about it midway through the playoffs. They talked about it on the verge of reaching the final. Changes were coming, so captain Steven Stamkos and his teammates told each other, “Let’s take advantage of this opportunity.”

Tampa Bay did just that in winning the championship back to back, and players and coaches celebrated in a fashion befitting the end of an era. Coach Jon Cooper said it felt like “the last day of school” and the Lightning aced their final exam before inevitable changes break them apart.

“This team, knowing that we’re probably not going to be together, this was the end of a special group for two years,” Cooper said. “Who knows what’s going to happen here, but I think that was a huge motivator for our group.”

It took a strange sequence of events to keep the Lightning together this season. Longtime forward Tyler Johnson was put on waivers last fall when it looked like they needed to clear salary cap space, and general manager Julien BriseBois paid the price of a second-round pick to dump salary in late December.

Then star forward Nikita Kucherov discovered he needed hip surgery, the rehab of which would cause him to miss the entire 56-game regular season that was squeezed into four months. It was a major loss but also one that allowed Tampa Bay to stash his $9.5 million cap hit on long-term injured reserve and put a playoff-worthy team on the ice.

Salary cap gymnastics also allowed Tampa Bay to add David Savard at the trade deadline, and the rugged defenseman who had never won it all before set up rookie Ross Colton’s winning goal in the Cup clincher Wednesday night.

It had all bounced the right way for the Lightning.

“I don’t see the circumstances of what happened last year happening again,” Cooper said during the final. “I know the players don’t see that.”

Blake Coleman and Barclay Goodrow, the 2020 trade deadline pickups who were so important in these two titles, are almost certainly gone as unrestricted free agents. The Lightning could lose Johnson, veteran forward Alex Killorn, savvy defenseman Ryan McDonagh or another important player in the Seattle expansion draft. Playoff leading goal-scorer Brayden Point needs a new contract extension with his deal up next summer.

Add to that the reality of the cap remaining flat at $81.5 million because of pandemic revenue losses across the league, and there’s little cushion for a contender even this deep to pony up to bring the band back together.

Minutes after parading the Stanley Cup around the ice at Amalie Arena, Stamkos said he and his teammates knew that might be the last game the group ever plays together. The Lightning certainly made the most of it as just the second team to repeat since the cap era began in 2005.

“No matter what happens from here on out, this group is going to be etched in history forever,” Stamkos said. “We’re back-to-back Stanley Cup champions. That doesn’t happen very often.”

It’s now up to BriseBois to address Tampa Bay’s impending breakup. After trading first-, second- and fourth-round picks in the draft this year and second- and third-rounders next year as part of loading up to win now, the next steps will be painful and may come with a drop in the standings.

Still, there is reason to believe Tampa Bay will be perennial playoff contenders for years to come and with plenty of talent to add a fourth championship.

Kucherov — who joined Mario Lemieux as the only players to lead two consecutive postseasons in scoring — is signed through 2026. Norris Trophy finalist defenseman and 2020 playoff MVP Victor Hedman is signed through 2025 and Stamkos through 2024.

The most important piece of the future is goaltender Andrei Vasilevskiy, who is under contract through 2028. He won the Conn Smythe trophy as playoff MVP after never losing back-to-back games and posting a shutout to close out each round.

“When he locks in, he is remarkable to watch,” Cooper said. “I can’t believe how he shuts the door in the biggest games of his career.”

Tampa Bay may need Vasilevskiy to bring his peak playoff form to the regular season. That’s the kind of evolution Jonathan Quick went through with the Los Angeles Kings after winning the Cup twice in three seasons, and Vasilevskiy looks up to the challenge of putting Tampa Bay on his shoulders.

“He doesn’t want people next to him to say he’s the best because he wants to prove it,” Kucherov said. “But I know he’s the best.”

The Lightning the past two years might have been the best the NHL can offer in a cap world, even with an expiration date on a run of success that includes three trips to the final and five to the semifinals in the past seven years.

Cigar in hand, Cooper didn’t want to talk about next season yet. .

“Let’s be honest: We’ve been knocking at the door for so many years,” he said. “To be able to do it back-to-back, it kind of cements this group as, well, they’re special.”