Shaun White, center, and fellow halfpipe medalists Ayumu Hirano of Japan (left) and Scotty James of Australia (right) elevated their sport with their fierce final competition. (Gregory Bull/AP)

The greatest competition so far at these Olympics ended with the three medalists and rivals sharing a long hug. The embrace may have begun as obligatory congratulations to show sportsmanship, but as the Phoenix Snow Park crowd lifted its dropped jaws and the cheers grew louder, the men — Shaun White, Ayumu Hirano and Scotty James — turned sincere.

“Thank you,” they all said to each other.

In that simple moment, language differences and years-old competitive tension yielded to respect. Look at what they had done for the sport of men’s snowboarding halfpipe, for a young PyeongChang Games that had yet to see a high-quality showdown quite like this and, most of all, for themselves. It may go down as the greatest day in a growing sport, a balanced competition full of dramatic upstaging among the 12 finalists and a conclusion that left halfpipe’s most legendary figure as the last man on the mountain and needing to prove his greatness.

“Done,” White said. “And I won.”

That’s not just how you validate a reputation. That’s how you elevate a sport. Sometimes, there’s a difference between dominating and elevating. An all-time great can happen to own a lesser era, yet fail to advance the game. To elevate requires a combination of dominant performance and a collection of challengers with the ability and chutzpah to test a great one’s limits.

Of the many gifts White has bestowed upon snowboarding, this is the most important: He inspired future generations to come after him. And they’re making their charge now. He seemed vulnerable after falling on one of his final runs at the 2014 Sochi Olympics and finishing fourth. And on Wednesday morning, under gray skies and with snow trespassing on occasion, it was time for halfpipe’s standard-bearer and the new generation to be at their best and go at it like never before on the big stage.

On his third and final run, White needed to beat Hirano’s 95.25 score to win. He posted a 97.75 out of a possible 100, flirting with perfection under perhaps the greatest pressure of his career. To capture his third gold medal, White unleashed consecutive 1440s (four full spins) at the beginning of his run, and by the end, he had won over the crowd again.

“Gosh, man, I think that’s the best run that’s ever going to be done,” said Patrick Burgener of Switzerland, who finished in fifth place. “It’s going to be hard to do better.”

White was in a similar position in 2014, failed and didn’t even win a medal after taking back-to-back golds in 2006 and 2010. This time, he was assured at least a silver going into his last run. But if he had lost to Hirano, who won silver in Sochi as a 15-year-old, it might have been considered a torch-passing moment.

Hirano is 19 now; White is 31. James, the bronze medalist and the feistiest of White’s rivals, is 23. Hirano, James and other young prodigies still have time to catch White. But the aging and evolving Flying Tomato had to stay on top. If he had lost any more ground, he would be competing against time to regain it.

The greatest athletes have a way of bending time. They have a way of manufacturing redemption. When White lost in Sochi, he was emotionally absent. He had become too big for the sport. He needed to find his passion again. Then the new generation threatened to take over, and his passion wasn’t a problem anymore.

“It was motivating,” White said. “It’s nice to see up-and-coming riders pushing it because it helps motivate me to get to that next place. I needed that.”

And the youngsters needed to prove themselves against White at the Olympics. It led to a banner competition. Nine of the 12 riders posted best scores of at least 80. But despite many impressive displays, it felt like a three-man competition from the start. During the first of three runs, James posted a 92.00 score. Five minutes later, White put down a 94.25. On the second run, Hirano threw a 95.25 on the board. But the Japanese snowboarder had a feeling that score would not win the competition.

“I knew what Shaun was going to do next, and also I knew he has the same tricks as I do, so I was not really relieved,” Hirano said. “I knew that Shaun, even if he had a lot of pressure on him, would be able to do more.”

That’s how White, Hirano and James operate. They’re always looking at each other, expecting more. At times, the competition has been bitter, especially between White and James. Even on this day, James made veiled comments questioning whether White deserved a higher score than Hirano on his final run. James didn’t go into detail, but he concluded, “It could have gone either way.”

Later, James abandoned the petty behavior and turned introspective. He appreciated the rivalry and marveled at what it has done for him and the sport.

“I think it’s really healthy,” James said. “It’s awesome for us. I love watching guys in other sports ride it out. The process can be overwhelming. Shaun has achieved a lot of amazing things. It can be easy to discredit yourself when you’re against someone like him.”

But when you stand up to the king, it can reveal the virtue of the entire sport.

“I think the easiest way to describe the competition is just, simply, amazing,” James said. “It was just a day for everyone to put on a show, and I was expecting a really, really good battle. And that’s what it was. All year, the quality, it’s been at such a high level. Everyone has brought out the best in each other. I think that’s really cool. Also, I feel like that may be the first time ever, really, in any snowboarding halfpipe, that we’ve seen something this exciting. And that’s why it’s been so captivating.”

For now, White stands, as usual, as the men’s halfpipe giant. He is savoring this moment more than the others not just because of what he had to come back from, but who he had to go through this time.

The present kept the future at bay. White won’t be able to do it forever, though. As wonderful as it has been to watch his reign, it’s becoming clear that the sport won’t suffer when his time ends. The evolution doesn’t diminish his legacy. It enhances it.