Shaun White won the gold medal in the men’s halfpipe in a dramatic finish on Wednesday in Pyeongchang.

White was passed by Japan’s Ayumu Hirano for first place in the second run, and had to pass him on his third and final run.

White scored a 97.25 on his final run, winning gold four years after failing to come away with any medals in the Sochi Olympics in 2014.

Shaun White needed all 97.25 points of his third and final run in the men’s halfpipe to win gold on Wednesday in Pyeongchang in the Winter Olympics.

Unlike Chloe Kim the night before, White was pushed in the men’s final by Japan’s Ayumu Hirano and Australia’s Scotty James, getting passed by Hirano after Hirano scored a 95.25 with a strong second run.

The last snowboarder to go in the event, White had to top Hirano to get gold and he did so with a near-perfect run, throwing down back-to-back 1440s followed by back-to-back 1260s to steal the lead back.

White pumped his fists as he finished the run, but then had to wait in agony for the judges’ scores to see if he won gold or silver. When they announced his 97.25 points, White fell to his knees, ecstatic.

The gold is a redemption of sorts for White. After winning golds in Turin in 2006 and Vancouver in 2010, White fell short of his goal in Sochi in 2014, failing to come away with any medals. In between Olympics, White went through some turmoil, getting accused of sexual harassment by a former female drummer in his band, and suffering a gruesome injury to his face that he revealed in an interview with NBC’s Mike Tirico made him question his future in snowboarding.

Back at the Olympics, White accomplished his goal of gaining a third gold medal in what may be his last games.