Stephen Gallacher is eyeing a Masters and Ryder Cup debut after recovering from a nightmare start to the final round to become the first player to successfully defend the Omega Dubai Desert Classic.

Gallacher began the day with a two-shot lead over playing partner Rory McIlroy, but bogeyed the first two holes and dropped further shots on the sixth and eighth to fall two off the pace.

However, the 39-year-old Scot found the back nine at Emirates Golf Club very much to his liking for the second day in succession, making birdies on the 11th, 13th, 16th and 17th to finish 16 under par after a closing 72.

It was nothing like as spectacular as the seven birdies and an eagle he produced to cover the same stretch in just 28 shots on Saturday, but was enough to win by one shot from Argentina's Emiliano Grillo.

"I think it took everything I have to be honest," said Gallacher, who was embraced by his children Jack and Ellie after sealing victory with a par on the 18th. "After the start, it was the plague of the front nine again but I just tried to build on yesterday's performance and stay patient.

"I was quite fortunate that no-one was running away with it. I knew I was only a couple back with three par fives (to play) and the 17th you can go for, so I just tried to hit one shot at a time as yesterday.

"When I holed the putt on 11 - after not making a birdie on 10 - I was level with seven to go and I thought I would have taken that at the start anyway; then I had three birdies from then on in.

"I knew a five (on the 18th) was going to win it. It's the only time I've had backspin all week and it nearly came back into the water, but it's done now and I am delighted. To do it in the 25th year of the event is even more special."

Gallacher's recent record in the event now reads 10th, 2nd, 1st, 1st - "I wish I could play it every week" he admitted - and his third European Tour victory lifts him from 67th in the world rankings to inside the top 40.

If he can maintain that position until the end of March he will earn a first invite to the Masters at Augusta, while the £250,000 first prize lifted him to seventh in the Race to Dubai and 14th in the European Ryder Cup points list.

"That (world's top 50) was my goal at the start of the year," Gallacher added on Sky Sports. "I knew I was only a win away from getting into all the events like the WGC Match Play and the US Open and if you have aspirations of getting into the Ryder Cup you have got to be in them, so I am delighted with that."

Gallacher lives just 35 miles from the Ryder Cup venue of Gleneagles, where he lost out in a play-off for the Johnnie Walker Championship last August, a week before the qualifying race started.

"You don't want to leave it too late so hopefully I can build on it," added Gallacher, who is the nephew of former Ryder Cup captain Bernard Gallacher. "I'm playing in all the events now and hopefully the Masters so that will be brilliant."

Gallacher's poor start meant McIlroy's opening six pars were enough to inherit the lead, but the former world number one promptly dumped his tee shot to the seventh in the water short of the green.

Although he rescued a bogey with a brilliant third shot from the drop zone, McIlroy never reproduced the form which saw him shoot an opening 63, eventually carding a closing 74 to finish four behind Gallacher.

For much of the last round it was a comedy of errors from the final few groups, so it was perhaps fitting that Grillo overtook Romain Wattel as the clubhouse leader thanks to a stroke of good fortune on the 18th.

Grillo completed a flawless 66 in amazing fashion, the world number 268 holing from 65ft for an eagle after his approach had clattered into the hospitality tents behind the green and bounced back onto the putting surface.

Gallacher still had three holes to play however and holed from six feet on the 16th and a matter of inches on the 17th to give himself a one-shot cushion playing the last.

"Apart from the second shot to 18 everything was quite good," Grillo said. "The second shot went a little bit further than I wanted and got lucky, then I got lucky with the big putt.

"I am quite happy with how it went today, it was a good round overall. I left some putts out there but the one on the last gave me the ones I missed."

Wattel and American Brooks Koepka shared third place on 14 under, with McIlroy joint ninth. World number one Tiger Woods carded a final round of 71 to finish in a tie for 41st on six under.