Stradivarius, ridden by Frankie Dettori and trained by John Gosden, has won the Lonsdale Cup at York to land the inaugural WH Stayers' Million bonus.
The £1m prize was announced in January for any 'staying horse' that won one of four races in May - including the Yorkshire Cup - followed by the Gold Cup at Royal Ascot, the Goodwood Cup and the Lonsdale Cup.
"I didn't feel the horse was as good today as at Ascot, only his courage and class got him through," Dettori told ITV Racing. "Show me the money!"
A horse had never won the four races in the same season before.
Stradivarius triumphed in the Yorkshire Cup at York in May, before claiming the Ascot Gold Cup in June and defending his Goodwood Cup crown in August.
The 4-11 favourite, owned by Bjorn Nielsen, got the upper hand in the final furlong at York to beat his old rival Count Octave.
"He has managed to get over every hurdle and he must feel like he has just gone 12 rounds with Muhammad Ali," Gosden told ITV. "He is not a big horse but he is fabulous and he showed a real mentality.
"Full marks to the owner, he's been trying to breed a Derby winner for years and he ends up with a Cup horse."
There was a surprise in the Nunthorpe Stakes as pre-race favourite Battaash finished fourth behind shock 40-1 winner Alpha Delphini.
The seven-year-old, trained by Bryan Smart and ridden by Graham Lee, edged out Mabs Cross in a photo finish.
'A giant in heart and quality' - analysis
BBC horse racing correspondent Cornelius Lysaght
Well, it wasn't the cakewalk that some thought it might be, and Stradivarius really had to knuckle down to win the million because, as Dettori agreed, about three furlongs from the finish - 600m - things didn't look especially great.
But the fact is that this horse, who's not very big in terms of size but is a giant in terms of heart and quality, was able to dig deep enough to stay on stoutly and ultimately win actually quite well.
And after the campaign he's had, winning month after month and over long distances, he can be forgiven pretty much anything.