Qualifier Dan Brown wrote another chapter in his incredible Open Championship story to set up a thriller of a final day at Royal Troon.
Brown, who birdied the 36th hole in qualifying to secure his major debut, defied miserable conditions to leave himself 18 holes away from a fairytale triumph.
The world number 272 held the outright lead until an unfortunate double bogey on the 18th, but a third round of 73 left him just a shot behind American Billy Horschel.
Horschel, who famously followed a 67 with an 85 in similar weather the last time Troon staged the Open in 2016, only put his rain jacket on between shots as he scrambled his way to an astounding 69 to finish four under par.
That gave the 37-year-old a slender lead over six players, with Brown joined on three under by compatriot Justin Rose, US PGA champion Xander Schauffele, and a trio of players who had exploited ideal early conditions.
South African Thriston Lawrence, who teed off more than three hours before the final group, carded a superb 65 to set a clubhouse target which was matched by Sam Burns (65) and Russell Henley (66).
And as the weather took a significant turn for the worse, they steadily climbed the leaderboard to end the day in a tie for second, with world number one Scottie Scheffler ominously poised another stroke behind.
Ireland’s Shane Lowry, who took a two-shot lead into the third round, struggled to a 77 to fall three shots off the pace in pursuit of his second Open title.
Lowry found himself three clear when Rose and Brown both bogeyed the first and again after holing from 16 feet for birdie on the fourth.
Another birdie putt from Lowry came up inches short on the 613-yard sixth and Brown took full advantage, a superb approach leaving a tap-in.
Brown’s drive on the seventh was so far off line that it almost hit Scheffler and Dean Burmester on the eighth green, but he was fortunate to end up with a clear shot and hit a superb third to three feet to set up an unorthodox birdie.
Minutes later there was a tie at the top after both he and Lowry found the Coffin bunker on the eighth, with Brown making a bogey and Lowry a double after hitting his second shot over the green.
Horschel’s fourth birdie of the day made it a three-way tie before a combination of bogeys across the 10th and 11th left the leading trio together on five under, but Brown birdied the 12th to edge into the outright lead.
Lowry, who had complained furiously about what appeared to be members of the broadcast media in the fairway on the previous hole, three-putted the 12th from off the green to fall two behind.
Brown bogeyed the 13th to drop back alongside Horschel and enjoyed another massive stroke of luck on the next, hooking his tee shot well left of the green but ending up with a perfect lie on a walkway.
He chipped to three feet to save par and also made a brilliant par on the daunting 15th, hitting driver off the tee and for his second shot before getting up and down from 40 yards short of the green.
After reclaiming the outright lead with a birdie on the 16th, Brown bogeyed the 17th and ran up a double on the last, where he was unfortunate to see his drive finish on the edge of a bunker.
“That finish is why it’s a little bit deflating as I’ve ground it out today and through not hitting a bad golf shot I’ve dropped three,” Brown said.
“It’s a bit frustrating but at the start of the week if you’d told me I’d be one or two back going into the final round of the Open I’d have snapped your hand off.”
South Korea’s Si Woo Kim had earlier made the first hole-in-one on the 17th in 10 Open Championships at Troon.
Kim was two over par after 16 holes but walked off the 17th back to level for the day after his tee shot pitched just short of the green and rolled inexorably into the cup on the 238-yard par three.