ATLANTA — Rory McIlroy finally won the FedEx Cup when he least expected it.

McIlroy was three shots behind with three holes to play Sunday in the Tour Championship. Nearly two hours later, he holed a 15-foot birdie putt on the fourth extra hole to win the tournament and claim the $10 million FedEx Cup bonus.

“I took advantage of my opportunities today and yeah, here we are,” McIlroy said, his voice hoarse from screaming over so many quality shots and big moments.

In its 10th year, the FedEx Cup never had a finish like this.

McIlroy fittingly won on the 16th hole, where his remarkable rally began in regulation when he holed out from 137 yards for eagle.

He made birdie on the 18th hole for a 6-under 64 to join a three-man playoff with Ryan Moore (64) and Kevin Chappell (66).

Moore had an 8-foot birdie putt on the 72nd hole to win, but it caught the lip and spun out. Chappell had a 20-foot birdie putt on the last hole but left it short.

They finished at 12-under 268.

Dustin Johnson surprisingly was never a factor, as he hit too many errant shots on the front nine and never recovered, closing with a 73. Johnson, however, still would have won the FedEx Cup if either Moore or Chappell had won the tournament.

McIlroy looked ready to put the perfect finish on his big day when he hit over the water to 6 feet for an eagle putt on the par-5 18th – the first playoff hole. Moore, however, holed a 10-footer for birdie, and then McIlroy’s eagle putt slid by the hole, and he removed his cap in disbelief.

Returning to the 18th, McIlroy missed an 18-foot birdie putt for the win. On the third extra hole, the par-3 15th over the water from 201 yards, McIlroy had to make a 7-foot par putt just to stay in the game.

Nothing was bigger than that birdie at the end. McIlroy stiffened his back, clutched both arms and shouted above the raucous cheers at East Lake. He earned a total of $11.53 million on Sunday, including $1.53 million for the Tour Championship.

Moore, meanwhile, got a consolation prize, as U.S. Ryder Cup captain Davis Love III rounded out his team by making Moore his fourth captain’s pick. Moore joins Brooks Koepka as the only rookies on the U.S. team.

EUROPEAN TOUR: France’s Alexander Levy wasted a four-shot lead but beat Ross Fisher of England in a playoff to win the fog-shortened European Open in Bad Griesbach, Germany.

Levy had bogeys on the 16th and 18th and narrowly missed a birdie putt on the 17th to finish with a 2-under 69 and a 19-under total.

Fisher shot a 64 but also missed a birdie putt on the 17th. Levy then made a birdie on the second playoff.

The tournament was reduced to 54 holes because of fog delays over the first three days.