Al Kazeem got up in the shadow of the post to deny Mukhadram in the Prince of Wales's Stakes at Royal Ascot, with Camelot a disappointing fourth.
Paul Hanagan gave William Haggas' Mukhadram a bold sight from the front, kicking a good few lengths clear and at one stage appearing like he may hold on.
But James Doyle got stuck into Roger Charlton's stable star and the 11-4 chance was on top just before the line.
The Fugue ran a blinder on her first run of the year back in third.
Doyle said: "I thought Paul Hanagan gave his horse a fantastic ride, he got his fractions right. He got a couple of lengths on me turning in and I had to make them up.
"He's a very tough horse and I'm lucky to be sat on him
"It's magical really, to get a Royal Ascot winner. It leaves you speechless, it's what it is all about. Hard work pays off and when it does it's fantastic."