Stamp Hill left Ascot punters stunned as the 50-1 outsider turned the highly-competitive Gigaset International Heritage Handicap into a procession.
The Richard Fahey-trained four-year-old had been well beaten in all his four starts this season, but hit form to take the £93,000 first prize for connections.
The big field split into two groups for the first half of the seven-furlong journey, with Squats leading on the far side and Heaven Sent among those prominent nearer the centre.
Stamp Hill took control at the business end and stormed clear for Paul Hanagan to win by a length and a quarter from Mjjack. The winner's stablemate Withernsea was third, with Johnny Barnes fourth.
Hanagan said: "We always thought he had the ability, but I think the combination of blinkers first time and the ground helped him so much.
"I think I've ridden bigger-priced winners, but not in a race as valuable as this.
"He loved the ground, as he likes to get his toe in. I'm delighted for the horse, I think that will do him the world of good and his confidence as well."