Nakeeta edged out favourite Flymetothestars in a thrilling finish to the Betfred Ebor Handicap at York.
Ridden by 5lb claimer Callum Rodriguez, the Iain Jardine-trained six-year-old had not won since September 2015 but had gone close many times, including when touched off in the 2016 Chester Cup.
Lord Yeats and Ivan Grozny set a solid pace, tracked by Soldier In Action and Dubka, with 7-1 market leader Flymetothestars held up towards the rear.
The race for Europe's richest handicap opened up in the straight, as Flymetothestars burst through the pack to lead.
However, Nakeeta (12-1) was the last to arrive on the scene and got up to win by a head. Natural Scenery was two lengths away in third, with a further length and a quarter back to Arch Villain in fourth.
A delighted Rodriguez said: "It's unbelievable, it's been a great year for me, I moved to Michael Dods in March and my career has gone from strength to strength.
"Mr Jardine has been a good supporter of mine throughout the year and we've spent a lot of time with this horse over the last couple of months, going up on my Sundays off and riding out and I think he has had this race in mind for a long time.
"We know he stays two miles and likes a strong pace to aim at, we thought the Ebor would suit him down to the ground. He's better coming through horses, when he gets to the front he doesn't do a lot and I still probably got there a bit too soon.
"I was a little bit worried, but he saw it out well when the other horse came to him and did it well in the end."
Nakeeta was cut from 20-1 from 33-1 for the Cesarewitch with Paddy Power.
Jardine said: "He's run well in so many big races, we decided to claim off him today. Callum gave him a great ride, I've got my own apprentice (Jamie Gormley), but Callum just has that bit more experience.
"He's come close so many times he deserves this, I'm so glad he's won one. He came from a different parish. He's a hold-up horse and needs cover. When the favourite came at him, I knew he'd stay on strongly.
"He's been unlucky in the past, but it all worked out today.
"We were second in the Ebor last year with Shrewd. Nakeeta missed the cut last year and ran in the two-mile race at the meeting instead and was second. I've been training six or seven years now and it is days like today why we do it.
"Days like this are what it's all about, it's brilliant."
William Butler, assistant to Sir Mark Prescott, trainer of runner-up Flymetothestars: "So Close, it's frustrating, but you can't win them all. He hit the front and was just collared in the end. I'll be glad if he's sound in the morning, he's very fragile but very talented.
"I'm not sure if the Cesarewitch is his race, he has too much class and speed and may not stay. We'll see. It might have been his last handicap."
Tim Palin, of owners Middleham Park Racing, added: "I wouldn't know where he'll go next, this was an afterthought really. The Cesarewitch wouldn't be his race, he's too keen for a race like that.
"We might look to France, he'll probably get his ground there, I just hope he's fine in the morning."