Colin Montgomerie, five shots behind with a round to go, pulled off his first win for 19 months at St Andrews - in a manner he never could have envisaged.
The 42-year-old Scot, who thought he would need a score in the mid-60s just to have a chance of catching England's Kenneth Ferrie, became the third Scottish winner of the Dunhill links championship in its five-year existence with "only" a oneunderpar 71.
That was because Ferrie, who pushed him into second place at the European Open in July, crashed to a 77 in the wind and cold.
The pair were level with one hole to play but whereas Ferrie three-putted for the fifth time in the round, Montgomerie got down in two for a winning birdie.
The £449,741 first prize, achieved with a nine-underpar total of 279, now gives Montgomerie - second to Tiger Woods in the Open on the same course three months ago - a real chance to win his eighth Order of Merit title.
The Scot, who went through a painful divorce last year and saw his golf game suffer badly for a while, moves up from fourth to second behind Michael Campbell. He also goes top of the Ryder Cup points table and has regained a place in the world's top 20.
A relieved and delighted Montgomerie said: "That's the most important win of my career - and for it to happen here makes it really special.
"It's been a long time and you don't know if the next win is going to come.
"I won seven Order of Merits and I would not say it was easy, but it was expected . . . and then it stops.
"My life changed dramatically a couple of years ago, but I was looking forward to coming back here so soon after the Open experience. I'm thrilled."
Montgomerie has earned nearly £900,000 from his two visits to the Home of Golf this year, but what mattered most to him was the victory. It means he has won at least once every season since 1992.
Ferrie said: "To have been five in front and Colin to just shoot 71 to win is pretty poor.
"I needed to score 75, basically. They were tough conditions but, if you play well, it's not that tough.
"I do feel I let him win. It's my own fault - I have got nobody to blame but myself."
Joint third were Ireland's Padraig Harrington, Dane Anders Hansen and Swedes Henrik Stenson and Robert Karlsson. Of those, Stenson had the best chance but bogeyed the 16th and 17th.
Montgomerie took just nine holes to wipe out Ferrie's overnight lead, going out in 33 against the former British boys' champion's 38.
While he picked up birdies at the second, fifth and ninth, Ferrie, who had also birdied the long fifth, three putted from just short of the sixth and double-bogeyed the 390-yard seventh.
Montgomerie could not keep the tide going his way, though. He three-putted the short 11th and 348-yard 12th, the second of those for double-bogey after driving into a pot bunker.
Without doing anything special himself, Ferrie was three clear once more. But he three-putted himself at the next - and when he did it for the fourth time at the 15th they were level again, because Montgomerie had made a 45-footer for birdie seconds earlier.
Darren Clarke, who was joint seventh, has pulled out of the next two US Tour events - the American Express world championship in San Francisco starting on Thursday and the Las Vegas Invitational - because of his wife's continuing battle with cancer.
* The celebrity proam competition was won by Stenson and American Rurik Gobel, with Ferrie and Olympic gold medalist Jonathan Edwards in joint second.