Odds-on favourite So You Think denied the Queen's horse Carlton House to win the Prince of Wales's Stakes at Royal Ascot.
The winner, trained in Ireland by Aidan O'Brien, got the better of a duel up the home straight to triumph by two and a quarter lengths from the royal runner in the race's 150th anniversary.
Joseph O'Brien, the trainer's 19-year-old son, secured his first victory at the meeting as his 4-5 chance saw off the challenge of Ryan Moore on Carlton House (7-2), with Farhh (6-1) half a length back in third.
The Queen had been hoping for her first triumph at the royal meeting, in Diamond Jubilee year, since Free Agent won the Chesham Stakes in 2008.
Carlton House finished third in the Epsom Derby last year when favourite and went on to be fourth in the Irish version. He came into the race having won the Brigadier Gerard Stakes on his seasonal return at Sandown three weeks ago.
But So You Think, who was bred in New Zealand and formerly trained in Australia, proved too strong in the closing stages to claim the 10th Group One win of his career and take his career earnings past the £5m mark.
After victory in the mile-and-a-quarter contest, O'Brien Sr admitted he blamed himself for the horse not always delivering on his potential and said he changed his routine after listening to former trainer Bart Cummings.
So You Think came to the Irish trainer with a huge reputation in early 2011, but he was beaten into second by Rewilding in this race last year when O'Brien said he had got his preparation wrong.
"Bart always said he was a speed horse and I tried to train him for stamina," he said.
"Everyone was of the opinion before we got him that he was all speed but I started off on the wrong leg with him and tried to make him stay a mile-and-a-half and did too much with him.
"I overworked him and got him wrong. We're just delighted we eventually got him back to where Bart had him and all the people in Australia said he was.
"All I can do is say 'I'm sorry I took so long to get him to show it'. If he wasn't such a great horse I would have made a right muck up.
"But he's one of those special horses and a great travelling class. I'm delighted he showed it today.
"We expected a big run, we felt like we had him in a place that he was never in before with us, which is incredible."
So You Think's stablemate Robin Hood had made the early running, before the six-year-old cruised into the lead.
Carlton House appeared to briefly edge in front as Moore guided his mount to the rail, but So You Think rallied for young O'Brien.
"My horse relaxed lovely and quicked up very, very well," added the teenager.
"Ryan [Moore] moved on the inside and I had to get round Johnny Murtagh [on Big Blue Kitten]. Once my horse got on the inside he was never going to be beaten.
"I just wanted to get him in rhythm and let him relax. And he relaxed great. He's got lots of class and pace and when things are working out he's an amazing horse."
It means the Queen must wait for her 21st winner at the royal meeting, and her first Group One victory in Britain since Dunfermline won the St Leger in 1977, Silver Jubilee year.
She has two more hopes this week - Momentary in Thursday's Ribblesdale Stakes, and Estimate in the Queen's Vase on Friday.
So You Think is most likely to run next in the Coral-Eclipse Stakes at Sandown on 7 July, while a career at stud in Australia awaits at the end of this season.
The Sandown race could see a potential clash with Frankel. Asked if he would be happy to take on the world's top-rated racehorse, his trainer said: "So You Think is a horse with loads of pace, so I'd love to."
Earlier on Wednesday, O'Brien claimed the opening Jersey Stakes with 20-1 chance Ishvana, who is bred and owned by the trainer's wife Annemarie and was ridden by Seamie Heffernan.
Joviality (11-1), winner of the Musidora Stakes at York last year, landed the Windsor Forest Stakes for trainer John Gosden.
Prince Of Johanne (16-1) won the Royal Hunt Cup, Ceiling Kitty (20-1) triumphed in the Queen Mary Stakes and there was a victory for Duntle (4-1f) in the Sandringham Handicap.