Lucas Bjerregaard produced a brilliant round of 67 on the Old Course at St Andrews to reel in defending champion Tyrrell Hatton and win his second European Tour title at the Alfred Dunhill Links Championship.
The Dane started the day four shots behind Hatton and was six back with 12 to play as the Englishman looked set to make European Tour history and become just the fifth player to win the same event in three consecutive seasons.
A back nine stumble from the Ryder Cup star left the door ajar, however, and Bjerregaard kept his nerve to get to 15 under and take the title by one shot.
Hatton finished second alongside countryman and fellow Ryder Cup winner Tommy Fleetwood, with Finn Tapio Pulkkanen at 12 under.
Bjerregaard has been a hugely consistent performer since graduating from the Qualifying School in 2013, never finishing lower than 90th in the Race to Dubai Rankings presented by Rolex and winning the Portugal Masters in 2017 to go with the GolfSixes title alongside Thorbjørn Olesen.
The 27 year old had three consecutive top tens before finishing in the top 20 at his Portugal Masters title defence and will now move into the top ten in the Race to Dubai Rankings after his sparkling run of form.
“I'm getting a little emotional,” he said. “It's been a great year and now it's just a whole lot better.
“It didn't really look like I was ever in it today, it looked like Tyrrell was going to take off with it. I was trucking away at it. I've been playing well for a little while and I played really well today and I'm really pleased that it was enough.”
Hatton looked certain to join Sir Nick Faldo, Colin Montgomerie, Tiger Woods and Ernie Els with wins in the same event in three consecutive seasons when he went out in 32 but he came home in 40 to sign for a level par 72.
Reigning Race to Dubai champion Fleetwood made four birdies and a bogey in a closing 69 on a windy and at times very wet final day.
Every player went off between 08:30 and 08:40 in a shotgun start due to the high winds expected, with the leading two groups overnight going off the first.
Fleetwood made a quick move with a birdie from 18 feet on the second, while Bjerregarrd birdied his first hole after starting on the 18th to get within three.
Hatton birdied the third before a Fleetwood birdie on the fourth kept him within two but he was not there for long as Hatton found another gear.
He holed a 20-footer on the fourth and while Bjerregaard made a long putt of his own on the same hole, Hatton got on the par five fifth in two for his birdie and an approach to eight feet on the sixth gave him a fourth birdie in a row and a four-shot lead.
That lead soon became five but Bjerregaard holed long putts on the sixth and eighth and Fleetwood made a 12-footer on the 11th to cut it back to four.
Bunker trouble on the tenth and a three-putt from Hatton on the next saw the lead down to two and a 20-foot putt on the 13th from Bjerregaard meant it was just one shot.
Fleetwood had dropped a shot on the 13th but he regained it after an approach to six feet on the 15th before missing golden opportunities on the next and last as he set the target at 14 under.
Hatton missed the green on the 15th and 16th and when he failed to get up and down on both occasions for back-to-back bogeys, it was Bjerregaard who led by one.
The leader holed a 25-footer on the 16th to move two ahead but a three-putt bogey on the Road Hole left Hatton a 12-footer for a play-off ahead on the last, which he could not make.
Pulkkanen fired a bogey-free 69 to sit two shots ahead of China's Li Haotong - who carded the lowest round of the day with a 66 - and Italy's Andrea Pavan.
Three-time Major winners Padraig Harrington and Brooks Koepka, Tony Finau and Lucas Herbert completed the top ten at nine under.
Li and Allen Zhang won the team event by one shot at 35 under.