Altyn Orda finished with a flourish to cause an upset in the Godolphin Lifetime Care Oh So Sharp Stakes at Newmarket.
Roger Varian's filly had filled the runner-up spot on her first two starts and was a 25-1 shot stepped up to Group Three level.
The daughter of Kyllachy unshipped Andrea Atzeni on the way to the start and was under pressure early in the race, but to her credit, she responded generously to her rider's urgings.
While the well-fancied Gavota and heavily-backed 2-1 favourite I Can Fly wandered under pressure in the middle of the track inside the last of seven furlongs, Altyn Orda had the rail to help and stayed on straight and true to claim a last-gasp success.
Gavota was a neck away in second, with I Can Fly third.
Atzeni told ITV Racing: "She was cantering down to the start fine and then she looked at the guy with the camera and spooked. I fell off her and she got loose, but luckily the lads managed to catch her and I managed to get back on her.
"I knew when I hit the rising ground I was gradually getting to them. I didn't know if I was going to get there in time, but I was running them down and she's a very tough filly.
"She ran a nice race here last time, she's obviously improved and the lads have done a great job with her at home as she's a bit of a madam.
"She's obviously a very talented filly and she'll be a better filly next year as well, I'd say."
Varian said: "You are always nervous when they get loose. You feel so hopeless as you want to be out there to try to catch her.
"I'm pleased she didn't go too silly or gallop too fast and run into anything. I guess we might have to get a few more loose before the start!
"She is talented. Coming into the race she was a maiden, but those two maidens were red-hot races. The first one at the July Course has produced lots of winners and she got beat by one of Aidan O'Brien's (Bye Bye Baby) two weeks ago and she has won a Listed race since.
"She's a Group Three winner now and I think she has beaten a good field and it was a deep renewal of this race.
"I think we will come back for a Guineas trial or go straight to a Guineas of some description next spring. She will get a mile, no problem."
Roger Charlton said of the runner-up Gavota: "Our filly ran very well and James (Doyle) said he's still not convinced the course really suits her.
"She is a long-striding filly, but is not the most robust. That is definitely it for the season."