In a dramatic race that saw hot favourite Idaho appear to take a false step just under four furlongs out and unship Seamie Heffernan, Harbour Law made history for his Epsom trainer and her husband, former jockey Ian Mongan.
Sword Fighter was bustled up straight from the gates to take the lead, but Muntahaa soon went on with The Tartan Spartan third, Ventura Storm fourth and Idaho well placed.
When the field turned for home with the long straight in front of them there was no hint of the drama to follow, as Idaho was just about to make his move.
His Aidan O’Brien-trained stablemate Housesofparliament kicked for home, but was soon joined by Ventura Storm.
The latter, trained by Richard Hannon, held a narrow advantage in the final furlong for Silvestre de Sousa, but Harbour Law (22-1) came with a wet sail to give jockey George Baker his first Classic success.
Harbour Law won by three-quarters of a length from Ventura Storm, with Housesofparliament a short head away in third.