PYEONGCHANG, South Korea – Shaun White reached deep into his bag of unparalleled tricks to win his third Olympic gold medal Wednesday, edging out the strongest halfpipe snowboarding field in Winter Games history with a near-flawless run on his final attempt.

The 31-year-old White, who finished fourth in the 2014 Olympics, put his stamp on the PyeongChang Games in a thrilling return to riding excellence following troublesome years that included graphic sexual-harassment allegations and a settlement with his accuser.

Trailing Ayumu Hirano’s score of 95.25 going into the final attempt of the competition, White delivered a run that included back-to-back 1440s to win the gold with a 97.75. Australia’s Scotty James took bronze.

After an opening run of 94.25 by White, Japan’s Hirano overtook the American on his second run with a high-flying array of tricks that included back-to-back 1440s of his own. That set up the dramatic finish with White going last in the competition, and he came through with his strongest run of the day.

White’s gold was historic as it was the 100th for Team USA at the Olympic Winter Games. He had previously won gold in the halfpipe at the 2006 Turin Games and the 2010 Vancouver Games before a letdown in 2014.

Shaun White, of the United States, reacts after his run during the men’s halfpipe finals at Phoenix Snow Park at the 2018 Winter Olympics in Pyeongchang, South Korea, Wednesday, Feb. 14, 2018. (AP Photo/Gregory Bull)

In the days leading up to the halfpipe event, stories on The Cut and Slate highlighted a suit brought by Lena Zawadieh, the former drummer in White’s band, Bad Things. White, according to the lawsuit, sent Zawadieh pictures of erect penises and told her to wear more sexually revealing clothing and cut her hair. The suit was settled in May 2017.

The suit came during a tumultuous four years for White between the Sochi Games and his gold medal. White said he struggled with his poor finish in 2014 and was tiring of snowboarding, which he’d done at an elite level since receiving his first sponsorship as a 7-year-old.

“At the time I was burning out. It’s hard to admit,” White said. “At the time my heart wasn’t in it. After that Olympics, the easy fix is if you weren’t strong enough, if you didn’t have the right tricks. But getting the mindset better is really hard. I don’t know how to describe it. It’s like if you’ve ever been in a relationship and someone is like, they love you. I wish I could flip a switch and love you back – love snowboarding like I did when I was 7.”

It was tough to question his gold Wednesday, the United States’ fourth in four freestyle snowboarding events at the PyeongChang Games. And it’s impossible to deny the truth about Shaun White, snowboarder: He’s the greatest the sport has known.