LOUISVILLE – Rory McIlroy awoke Sunday to a storm that forced him into a waiting game and then discovered a film crew inadvertently showed the golf world the pass code to his iPhone as he typed it in.

Ninety minutes later he faced the burden of keeping some of the game's heavyweights at a distance and slugging it out with soggy Valhalla Golf Club to win the 96th edition of PGA Championship.

Two hours into his final round, he had lost the lead and looked puzzled as his game looked frazzled. But patient he remained.

The world's No. 1 player gathered himself and remained collected the rest of the way as fireworks exploded on the prairies and backwoods of the Bluegrass State. Barely beating the setting sun and approaching thunder and lightning, McIlroy held off Rickie Fowler, Phil Mickelson and Henrik Stenson to win the last major of the season and his second in a row.

Ignited by an eagle from 7 feet on the par-5 10th hole, and basically slamming the door shut on his competitors with a birdie from 10 feet on the 17th, the former Boy Wonder won his fourth major of his young career, three of them in the past nine played.

And on the heels of his tour de force to win the British Open, McIlroy became the first to win back-to-back majors since Padraig Harrington in 2008. And with his victory in the World Golf Championships-Bridgestone Invitational last week, McIlroy has won his past three starts.

"Just incredible. I didn't think in my wildest dreams I'd have a summer like this," McIlroy said. "I think I showed a lot of guts out there to get this done."

With a final-round, 3-under-par 68, McIlroy finished at 16 under and defeated Mickelson by one shot. Mickelson, trying to win his sixth major to tie Lee Trevino and Nick Faldo for 12th on the all-time list, closed with a 66 and nearly chipped in for eagle on the final hole that would have forced a playoff.

Fowler, who joined Jack Nicklaus and Tiger Woods as the only players in the modern era to finish in the top-5 in all four majors in a season, finished with a 68 and in a tie with Stenson (66) in third.

McIlroy two-putted from 35 feet on the final hole in near darkness to win his second Wanamaker Trophy. And at 25 years, 3 months and 6 days, McIlroy became the third youngest to win four majors in the modern era, trailing Woods and Nicklaus.

Now only the green jacket remains for McIlroy to become the sixth player to win the career Grand Slam.

"Obviously," Fowler said, "Rory played great this week, and he's been a deserving champion last three tournaments. He's playing quite good right now. Best player in the world, hands down. We'll see if we can sneak one away from him at some point."

"He's on a roll," Stenson said. "He is the best player in the world and just playing phenomenal golf. He's got confidence. I think more than anything you see that when you get off to a bad start or bad hole or two, when you've got that confidence, you can make birdie on the next or eagle the next."

"So it's just to take our hats off and give him the appreciation he deserves."

While ducks took to the course after torrential rains dumped an inch of rain in 45 minutes and forced stoppage of play for 1 hour, 50 minutes, birdies and eagles — and gut-saving pars, too — showed up when play resumed. On a course that may as well have been a sponge with putting greens doubling as dart boards, five players held at least a share of the lead at some point.

McIlroy began his round with a 1-shot lead but fell two shots back after bogeys on 3 and 6. A birdie on the 7th, however, was his first and put some pop in his step. After his eagle on the 10th, he punched the air with a clenched fist after a birdie on the 13th from nine feet gave him a share of the lead.

Mickelson, deflated throughout the year and demoralized last weekend because his game wasn't clicking, finally clicked. A 62 that included 10 birdies in the final round of the Bridgestone gave him some confidence heading to Kentucky. He'll leave the state disappointed but confident after posting four sub-70 rounds.

"Well, it's good for me to get back in the thick of it; to get back in contention, to compete in big tournaments. And it's just fun," said Mickelson, who locked down a spot on the U.S. Ryder Cup team with his runner-up finish. "I feel like I'm a lot closer to great play than what this year showed, and this is just a little glimpse of what I feel I can do and I'll see if I can work on it some more."