McIlroy took a six-shot lead over Rickie Fowler into the last round and was seven clear of Garcia, but saw that advantage cut to just two strokes as Garcia played the first 10 holes in five under par.

However, the 34-year-old Spaniard - fifth here in 2006 and now with 19 top-10s in 64 majors - crucially bogeyed the 15th to release some of the pressure and McIlroy would not be denied becoming the first European player to win three different majors since the Masters was founded in 1934. Even greats such as Nick Faldo and Seve Ballesteros won just two of the four.

McIlroy's closing 71 gave him a 17-under-par total of 271, two ahead of a gallant Garcia whose closing 66 left him joint second with Rickie Fowler. Fowler birdied three of the last four holes to card a 67 and has now finished fifth, second and second in the year's majors.

The Northern Irishman becomes just the third man in the modern era after Tiger Woods and Jack Nicklaus to win three majors by the age of 25, while the first prize of £975,000 was not the only windfall for the McIlroy family - his father Gerry and three friends each won £50,000 after putting £100 on the 15-year-old at 500-1 a decade ago to lift the Claret Jug before his 26th birthday.

Back up to second in the world rankings, McIlroy has completed three legs of the career Grand Slam and needs to win the Masters to join Gene Sarazen, Ben Hogan, Gary Player, Jack Nicklaus and Tiger Woods as the only men to have won all four majors. He led by four shots going into the final round at Augusta in 2011 only to collapse to a closing 80.

McIlroy is the second wire-to-wire winner of a major in succession after Martin Kaymer won the US Open at Pinehurst last month by eight shots, the same margin by which McIlroy won the 2011 US Open and 2012 US PGA Championship.

A similar procession was expected in some quarters on Sunday, not least when McIlroy got off to a flying start by smashing a drive down the middle of the first fairway and holing from 20 feet for birdie to extend his lead to seven shots.

However, the benign conditions were allowing the chasing pack to make a charge and it was Garcia who took most advantage, birdies on the first, third and fifth taking him to the turn in 32.

McIlroy had carded consecutive bogeys for the first time all week on the fifth and sixth and had to save par from a greenside bunker on the seventh, but also birdied the ninth to restore a four-shot cushion.

That lasted a matter of minutes though, Garcia holing from 12 feet for an eagle on the 10th to reduce the gap to just two shots, only for McIlroy to respond with a two-putt birdie on the same hole 10 minutes later.

It was Garcia's turn to feel the pressure as he carved his approach to the 12th into the grandstand, but he was smiling seconds later as the ball rebounded out and on to the edge of the green. From there he saved par, kissed the ball and deposited it straight back into the same grandstand - albeit at a considerably slower speed than the first time.

McIlroy agonisingly left a birdie putt inches short on the same hole before hitting a dreadful tee shot on the 13th which came up well short of the green, the resulting bogey cutting his lead to two shots again.

Then came the defining moment. With McIlroy watching back on the tee, Garcia failed to get out of a greenside bunker on the 15th at the first attempt and although he birdied the 16th, so did McIlroy and when Garcia left a birdie attempt on the 17th tamely short, it was effectively all over.

"It feels incredible," McIlroy told the BBC. "Today wasn't easy. There were a lot of guys making runs at me and I just needed to stay focused, keep in the present and concentrate on what I was doing out there.

"To be three legs towards the career grand slam at the age of 25 is a pretty good achievement. It's not going to sink in for a while."

Asked if he always felt in control, McIlroy added: "The lead never got less than two. I always felt I had that little bit of a cushion.

"I knew I had some holes where I could make birdie and 16 was the real hole for me which I think settled the championship."

Speaking about the bet struck by his father and three friends, he added: "I don't think it matters so much to my dad anymore but the team-mates he did it with, I think they're a little happier. Hopefully the bet still stands. I'm not quite sure but if it does then that'd be great."

There was some good-natured booing at the presentation ceremony when McIlroy thanked the fans for their support, even though he is a Manchester United fan.

The former world number one also praised the efforts of Fowler and Garcia, adding: "Well done for putting up such a fight. Rickie, no doubt with the way your major record is this year your time will come, and Sergio too....two of the best players in the world."

McIlroy also thanked his friends and family, adding: "This is the first major my mum (Rosie) has been to that I've won, so mum, this one's for you.

"I just can't wait to get back and defend this thing at St Andrews next year."