Staked to a six-shot lead, Justin Thomas spent more time Sunday worrying about what could go wrong than ending 12 months without winning.

And right when it started to go wrong, Thomas delivered his biggest shots in the BMW Championship.

In a span of three holes around the turn at Medinah, his six-shot lead shrunk to two. Thomas answered with two clutch wedge shots, two big putts and sailed to a 4-under 68 to secure a three-shot victory over Patrick Cantlay, who gave him a battle to the end with a 65.

“Patrick played unbelievably, put a lot of heat on me,” Thomas said. “In the end, it could have been good for me. It kept me focused, kept my head down. … I was really nervous going into today. I remembered that it’s really hard to win a golf tournament, and I’m glad that I was able to do so.”

The timing was ideal.

His first victory since the World Golf Championship at Firestone last year moved him to the top of the FedEx Cup going into the Tour Championship, where he will start the tournament at 10-under par with a two-shot lead under the new scoring format as the final 30 players chase a $15 million first prize.

“I can certainly say I never slept on a Wednesday lead,” Thomas said.

Cantlay, who made four straight birdies around the turn, secured the No. 2 position and will start at 8 under. Brooks Koepka will be 7 under, a staggered start all the way down to even par for the final five players.

That includes Lucas Glover, who went bogey-double bogey until finishing with a two-putt par from 40 feet to secure his first trip to the Tour Championship in 10 years.

It will not include Masters champion Tiger Woods, the defending champion.

Woods was a long shot going into the final round to crack the top 30, and he closed with a 72. East Lake was his first victory in five years, capping his return from four back surgeries, a special moment replaced some six months later by his Masters victory.

“It’s disappointing,” Woods said. “Last year culminated in a pretty special moment for me and would have been nice to go back there.”

Hideki Matsuyama took the 36-hole lead with a 63 until falling back with a 73. He responded with another 63 to finish alone in third, making him one of three players who moved into the top 30 to reach East Lake. The other was Jason Kokrak, but only after J.T. Poston made bogey on his final hole.

The final day to earn the eight automatic spots on the Presidents Cup changed nothing for either team.

Bryson DeChambeau held onto the final spot for the Americans when Tony Finau, who needed to finish alone in third, closed with a 69 and finished fourth. Jason Day failed to work his way into an automatic spot for the International side.

There wasn’t supposed to be much drama in the tournament, either, not with Thomas coming off a 61 to build a six-shot lead. Only seven players dating to 1928 had ever lost a six-shot lead on the PGA Tour. Thomas didn’t want to be the next.

That’s why he shut off his phone on his way to the course. It seemed everyone but him had already declared him the winner, and he found no refuge in the locker room.

“Guys giving me advice in the locker room how to finish off a tournament,” Thomas said. “I was like, ‘I’ve done this a couple times guys but, thank you.’ That’s what I was saying on the way over here. It’s a lot of the outside noise that makes it harder sometimes to stay focused.”

And the nature of that advice?

“Talk to your caddie a lot. Make sure you keep talking,” Thomas said. “‘OK, as long as you stop talking it’s fine with me.’”

He did talk to his caddie, mostly to get yardage from the rough because he didn’t hit a fairway until the fifth hole. Cantlay also got off to a slow start, and Thomas still had his six-shot lead through seven holes. But not for long.

Cantlay made an 8-foot birdie on No. 7, followed with a 12-foot birdie on No. 8 and a 6-foot birdie on No. 9. Thomas then helped out by hitting his second to the par-5 10th under a tree, hitting left-handed to get it out and making bogey. Cantlay made his fourth straight birdie, and the lead was down to two with eight holes remaining.

That’s when Thomas came to life with a wedge to 2 feet for birdie.

“The birdie on 11 was huge,” Thomas said. “That propelled me for the rest of the round.”

More important was his 12-foot par putt on the next hole. And then after Cantlay rolled in a 15-foot birdie on the par-3 13th, Thomas matched him from 12 feet.

Cantlay, who had nine birdies in the final round, missed an 8-foot birdie putt on the 14th and a 15-foot eagle putt on the 15th after driving onto the green.

“When you’re as far behind as you are, you kind of need everything to right,” Cantlay said. “Neither of those putts dropped at a point where I needed them to.”

Thomas finished at 25-under 263 — seven shots lower than what Woods shot at Medinah when he won the 2006 PGA Championship — and earned $1,665,000. Even more money is at stake next week, though this was a burden lifted. All he cared about was winning.