Frankie Dettori claimed his 60th Royal Ascot winner as Stradivarius took the Gold Cup after a thrilling finish.
Dettori was at his best on the 7-4 joint favourite, trained by John Gosden, to see off runner-up Vazirabad and long-time leader Torcedor in third.
It was the 47-year-old jockey's sixth Gold Cup win and he treated the 70,000 crowd to a trademark flying dismount.
Joint favourite Order Of St George, the 2016 winner and last year's runner-up, could only finish fourth.
Order Of St George's jockey Ryan Moore had earlier celebrated his own landmark - claiming a 50th Royal Ascot winner with victory on Hunting Horn in the Hampton Court Stakes.
And he took the Ribblesdale Stakes aboard Magic Wand to complete a double for trainer Aidan O'Brien.
But they were denied in the Gold Cup as Stradivarius, a son of 2009 Derby and Prix de l'Arc de Triomphe winner Sea The Stars, called the tune under Dettori on Ladies' Day.
Having won the Yorkshire Cup and now the big Ascot race, owner Bjorn Nielsen remains in line for a £1m bonus should the horse go on to win the Goodwood Cup and the Lonsdale Cup back at Ascot.
The winner of last year's Queen's Vase at Ascot triumphed again at the Royal meeting, but only after a pulsating battle up the home straight.
"He was a lion, he fought everything off," said Dettori after a three-quarter length win from Vazirabad, with Torcedor a head back in third.
"The crowd lifted him. I just wanted to time it right. I come alive here, I love it.
"To win the Gold Cup again, which is the showcase race of the week, is just amazing."
There had been ill-founded rumours Dettori might retire earlier in the month, but he and Gosden also enjoyed an opening day treble at this year's Royal meeting.
"That was one of those nasty fake news things. It actually quite upset him. He enjoys his riding and we're fortunate to have him around," said Gosden.
After his first Gold Cup win, the Newmarket trainer paid tribute to Stradivarius.
"He's a proper little staying horse that we call Mighty Mouse because he's not very big - he looks a bit like a mini Trigger with his four white feet, but he is a gorgeous horse," said Gosden.
BBC racing correspondent Cornelius Lysaght
It is extraordinary. Being staged over such a marathon distance, you'd think that the Gold Cup would have an element of "plodders Derby" about it, the runners stretched out like washing on a clothes line from here to Windsor Castle.
But year in, year out, a spectacular, breathless finish throws up some of flat racing's great moments even after that far.
This time the well-supported Stradivarius and Frankie Dettori were the ones, but only after a closing-stages encounter involving all of the race's major players - the winner, Vazirabad and Order Of St George - during which each looked likely to come out best at one time.
Double for Moore and O'Brien
Earlier Hunting Horn, a son of 2012 Derby winner Camelot, appeared to relish the fast going and was a convincing winner from Crossed Baton.
The 5-1 chance surged clear to triumph by four-and-a-half lengths.
Meanwhile Magic Wand (10-3) reversed Oaks form with Wild Illusion, who finished second, with Sun Maiden back in third.
American trainer Wesley Ward clocked up his 10th Royal Ascot victory with Shang Shang Shang.
Joel Rosario just got the 5-1 winner home from Pocket Dynamo in a thrilling finish to the Norfolk Stakes.
Former Godolphin stalwart Simon Crisford celebrated his first Royal Ascot winner as a trainer in his own right when 10-1 chance Ostilio won the Britannia Stakes under Silvestre de Sousa.
Dettori was denied a winner in the concluding King George V Stakes, with the fast-finishing First Eleven edged into third by 9-1 winner Baghdad, ridden by Andrea Atzeni for trainer Mark Johnston, with Corgi in second.
What's in store on day four?
BBC racing correspondent Cornelius Lysaght
Everything is looking good for a maiden British Group One win for trainer Jessie Harrington - a leading Irish jumps trainer also thriving on the flat - when Alpha Centauri lines up in the Coronation Stakes (16:20 BST).
The filly won the 1,000 Guineas at home in Ireland very well, with Clemmie comprehensively beaten in ninth place, though to be fair that one was first time out.
Today we'll probably find out if Billesdon Brook's 66-1 success in the 1,000 Guineas at Newmarket was a fluke or not; I'm imagining her running well without winning.
A better run than the Dante Stakes at York when he was sixth is expected from Wells Farhh Go in the King Edward VII Stakes (15:05). And if making further improvement - very possible - the unbeaten Main Desire will go well in the Commonwealth Cup (15:40) at rewarding odds.
14:30: The Albany Stakes (Group 3) 6f
15:05: The King Edward VII Stakes (Group 2) 1m 4f
15:40: Commonwealth Cup (Group 1) 6f
16:20: Coronation Stakes (Group 1) Old mile
17:00: Sandringham Stakes (Listed) (Handicap) 1m
17:35: Duke of Edinburgh Stakes (Handicap) 1m 4f