Frankie Dettori rode his first winner of the Betfred Ebor at York as Willing Foe came out on top in a pulsating finish to Europe's most valuable handicap.
Having finished third on his seasonal reappearance at Ascot last month, the Godolphin runner was a 12-1 chance for this prestigious one-mile-six-furlong test.
Dettori made sure his mount was never too far off the pace, settled in mid-division, and he came to throw down his challenge in the home straight.
Irish raider Royal Diamond, trained by Tommy Carmody, emerged as his most serious threat as they flashed by the furlong marker, but Willing Foe gave Dettori everything to pass the post a neck in front.
Royal Diamond ran a stormer to finish second, with Number Theory and staying-on favourite Motivado rounding off the places.
A stewards' inquiry was called soon after the finish, but the placings remained unaltered.