Frankie Dettori thrilled a big crowd on a rare visit to Ayr when gaining his first success in the £150,000 William Hill (Ayr) Gold Cup on Jimmy Styles.
When trainer Clive Cox's turn came to pick his stall at Thursday's draw ceremony there was a breakdown in his phone communication with the course, and he had to forego his preferred number 19 and be content with 15.
But all was well in the end as, given a superbly-judged ride by Dettori, the 14-1 shot came with a strong run to lead inside the final furlong to get the better of Barney McGrew by a head, with top-weight Knot In Wood third.
There was no containing Dettori's joy and having performed his trademark flying dismount, he enthused: "Clive was very confident, the ground had dried up and the rest is history. He has run tremendous races all season and I am ecstatic.
"It is like winning a Group One race. It is a major race in the calendar and now my name is in print. There is great turnout and we got a great reception from the crowd. My first ride here was 22 years ago and it is fantastic to have won the big race."
Cox said: "It is very special. He has always promised to be a good horse and it has all come right - we could not believe a week ago that the ground would dry up for him, but the good Lord looked after us."
Barney McGrew ran a cracker under Tom Eaves and his trainer Michael Dods said: "No excuses really, but Tom said the horse clipped heels early on and nearly fell. Tom timed his run to perfection and they just got caught - he has run a blinder."
Knot In Wood's trainer Richard Fahey reflected: "I thought he had come to win his race, but the weight just beat him - he is a legend. The plan now is to go for the Diadem Stakes at Ascot next Saturday. He won't have to give lumps of weight away there."