Free Agent gave The Queen a first winner at Royal Ascot since 1999 with a battling success in the Chesham Stakes, the opening race on the final day of the 2008 meeting.
The Queen was at the Berkshire track to see the Richard Hannon-trained youngster take the seven-furlong contest.
Held up in the rear by Richard Hughes in the early stages, the 7-2 joint-favourite came from last to first to win by two and a quarter lengths from the other market leader, Seaway. Markyg was third.
Pegasus Lad was quickly away and went on from Johnny Rook with Bad Beat and Dr Smart close up.
Seaway made his bid for glory inside the final quarter-mile, but he had no answer to Free Agent who burst through a furlong out to stamp his authority on the Listed event.
There was a late non-runner when Swindler was withdrawn at the start.
Asked what Her Majesty had said to Hughes afterwards, the rider remarked: “She was very gracious. To ride winners here is great, but to ride one for The Queen is special.
“We were worried about the ground, but once I went down to the start I knew he would be OK.
“He came through well and when I needed him to stick his neck out he did.
“He is a lovely horse, it’s a very important winner.”
Royal bloodstock advisor John Warren said: “The Queen was absolutely thrilled and after they passed the post she said ’I’ve done it!’ which was great.
“It had been a few years since her last winner here.
“We said if the horse won first time out he could come here and if he didn’t we would leave him alone.
“Richard (Hannon) did say to The Queen afterwards that he is in the Derby, but it will be one step at at time.”
Seaway’s trainer John Gosden said: “My owners (Princess Haya of Jordan and Sheikh Mohammed) are thrilled because they know Her Majesty very well, but I thought if we had beaten Free Agent we might be facing an evening stint in the Tower of London!”
Karl Burke, responsible for Markyg, said: “We took him to Hamilton 10 days ago in what turned out to be a hot maiden. Like all of mine he’s improved a lot for that run, so we’re very happy.”
Free Agent, now unbeaten in two starts, was given a quote of 33-1 with Stan James to give The Queen her first Derby success at Epsom next June.