Martin Laird is heading to this week's Masters in stunning form after ending a two-year winless drought in capturing the Valero Texas Open in San Antonio

The Scot secured the very last invitation into the year's first major after carding a final-round 63 to deny the world No.2 Rory McIlroy by two strokes in bright but windy conditions on the TPC San Antonio course.

Laird had begun the last round four strokes off the lead but sprinted into his closing 18 holes to be five under through eight holes.

He then went to six under with a birdie at the par-3 12th and raced ahead of the field to distance himself from McIlroy with back-to-back birdies at the 16th and 17th holes to be eight under par for his round.

For a second day running Laird played alongside three-time major winning Padraig Harrington and again outscored the Dubliner.

Laird last competed in San Antonio four years ago, when he was placed ninth.

After a disappointing first round last week in Houston, Laird had a lengthy session with his coach, Randy Smith, who previously worked with the former Open champion Justin Leonard. The Scot then came out and played the last seven holes on day two in five under par only to miss the cut by one shot.

However, he took that form into San Antonio for a third PGA Tour success after earlier career Tour wins in the 2009 Justin Timberlake Shriners Hospitals for Children Open and the 2011 Arnold Palmer Invitational.

Laird arrived in San Antonio having earned $69,200 but he's now added $1.116m to that tally along with a two-year PGA Tour exemption.

Of more importance to Laird is that he now joins fellow Scots Sandy Lyle and Paul Lawrie at Augusta National.

It will be Laird's third appearance since making his debut in 2011 when he played the final round alongside Tiger Woods who finished in a share of fourth behind South African Charl Schwartzel.

"It's unbelievable. I've been asked probably 30 times in the last couple of weeks 'Are you in Augusta? Are you in Augusta?' and I've had to say 'No' and every time it kind of hurt me a little bit after playing the last couple," said Laird. "So that was my major motivation; to try to get back into tournaments like that this year and this win goes a long way in doing that."

Laird's strong finish effectively ended McIlroy's challenge although the 23-year-old gave himself every chance of victory by picking up eight birdies, although he will perhaps rue the bogeys he picked up at the fourth and 10th holes.

He narrowly missed a 40-foot eagle putt at the last, but tapped in for birdie to guarantee second place.

"Even though I didn't get the trophy, Martin was just too good today, 63 in these conditions is just phenomenal," said McIlroy. "I'm really pleased with my game and I think this has been a great week for me."

Asked how he has shaken off his woeful form, he added: "I've just eliminating the stupid mistakes that I was making on the course and the mental errors."