French challenger Marchand D'Or inched out the Aidan O'Brien-trained US Ranger on the line to win the Darley July Cup at Newmarket.
Jockey Davy Bonilla settled his mount at the back in the six-furlong sprint but he judged the run to perfection.
In a keenly contested encounter, the 5-2 favourite came through on the rails late on to overhaul US Ranger and the pace-setter War Artist.
It made up for his fourth-place finish to Sakhee's Secret 12 months ago.
Trainer Freddie Head, who won the race as a jockey on Anabaa 12 years ago, said: "I am delighted.
"For me it's a great thrill. I won it as a jockey and now I've won it as a trainer. "I love the horse. He's not the best ride you can find. He's a bit difficult but he gave him a good ride. Davy waited and waited. When I heard the result I was quite happy."
US Ranger came close to giving O'Brien another Group One win but the Irishman was still delighted with his charge's display.
"He ran a great race and we're delighted with him. He just seems to be starting to learn what sprinting is all about," he said.
"I'm not sure what we'll do now but he's in all the top sprints."
Meanwhile, the 14-1 shot Little White Lie saw off his rivals to win the Bunbury Cup.
Ridden by Darryll Holland, the four-year-old was always prominent in the seven-furlong charge and dug deep late on to win.
Lovelace, ridden by Ryan Moore, failed by a head to add to last Saturday's win at Sandown.
Darley July Cup (Newmarket)
1. Marchand D'or (D Bonilla) 5-2 Fav
2. US Ranger (J Murtagh) 9-2
3. War Artist (K McEvoy) 11-2
13 ran
Ladbrokes Bunbury Cup (Newmarket)
1. Little White Lie (D Holland) 14-1
2. Lovelace (R L Moore) 15-2
3. Regal Parade (Ahmed Ajtebi) 12-1
4. Mastership (R Winston) 14-1
18 ran