Star mare Ouija Board had to call on all her many qualities to edge out Alexander Goldrun in an "awesome" renewal of the Vodafone Nassau Stakes.
Lord Derby's ultra-tough five-year-old went into the £200,000 Group One feature on the back of an unlucky run in the Coral-Eclipse at Sandown.
To ensure there was no repeat, Frankie Dettori soon had the even-money favourite racing on the heels of the leader, Chelsea Rose, with Alexander Goldrun held up in last place.
The Italian sent Ouija Board to the front fully three furlongs from home, a move which had the massive crowd on their feet.
Alexander Goldrun, however, had made smooth headway down the outside and soon headed Ed Dunlop's charge, going a neck up.
The pair then went head-to head through the closing stages and it was not until the shadow of the post loomed large that Dettori forced Ouija Board's nose in front for a dramatic short-head victory. Nannina kept on well for third two lengths away.
The contest provided a truly great spectacle for the packed stands and the two principals were given rapturous receptions, the like of which are normally reserved for the Cheltenham Festival, on their return to the unsaddling enclosure.
"It was an amazing race to watch and I'm lucky enough to train the winner," said an icecool Dunlop, who saddled Court Masterpiece to win the Sussex Stakes on Wednesday.
"Both mares are great mares, they've won a lot of Group Ones between them and I hope everyone enjoyed it, it certainly sounded like they did.
"Alexander Goldrun wouldn't go away. She came there looking the winner. Ouija Board doesn't normally take it up that far out but great credit to both horses, it was a great race."
Dettori, who was crowned leading rider at the meeting with five wins to his name, winning a trophy and a cheque for £1500 for the Injured Jockeys Fund, described the win as "emotional." He added: "The other mare went by me and as you know Ouija Board likes a target and she showed great guts and put her head down where it really matters."
Explaining his tactics he said: "She's won over a mile and a half and although she prefers a target I couldn't really afford a sprint with some of those good milers in the race so I made my way home. The second has done nothing wrong, it's just a shame there had to be only one winner."
Alexander Goldrun went down fighting in her attempt to win the race for the second year running. Her trainer Jim Bolger said: "I've never heard such applause for a runner-up. I was very happy with the run. I always knew it would be tight and it was on the bob of their heads.
"The ground was not a problem, that is not an excuse. The intended target is the Irish Champion Stakes and I don't see anything beyond that at the moment.
Wetherby trainer Robin Bastiman landed the biggest success of his 35-year career with Borderlescott in the £100,000 Vodafone Stewards' Cup.
The winner was gaining a richly-deserved big-race victory having finished fourth in the Wokingham Stakes at Royal Ascot and a head-second to Osterhase in a Listed race at Fairyhouse on his last two starts.
Royston Ffrench had ridden the gelding on those occasions and was back on board again. He gave the easy to back 10-1 shot a copybook ride to hit the front well inside the final furlong on the far side, having enough in reserve to hold the late charge of Mutamared (12-1) by a neck, with the gambled-on 5-1 favourite Firenze the same distance back in third.
Excusez Moi (12-1) was fourth in a race in which seventh-placed Woodcote was the first home out of those drawn low.
"It's the best day of my life," said a breathless Bastiman on greeting his bargain-buy. "I've only got 14 horses but this might do me a bit of good. It would be nice to go to the Ayr Gold Cup with the owners being Scottish but the handicapper might have something to say. On the other hand, he only just won."