Glen's Diamond repelled the late thrust of French raider Top Trip to land a thrilling renewal of the Qipco Yorkshire Cup at York.
Richard Fahey's charge had to settle for second behind Red Cadeaux last year but was allowed to go off a 25-1 chance this time after some indifferent efforts in the interim.
Tony Hamilton was positive from the off aboard the strong-travelling five-year-old and he looked to have all his rivals in trouble turning into the straight.
However, Mickael Barzalona switched Top Trip to challenge up the inner over two furlongs out and Francois Doumen's runner appeared to just edge in front inside the final furlong.
However, Glen's Diamond dug deep for Hamilton and fought back, with the pair racing neck and neck at the line.
The duo passed the post as one but Glen's Diamond was declared the winner by a nose from the 11-4 favourite, with Royal Diamond back in third.
Robin O'Ryan, assistant trainer to Fahey, was deputising for his boss, who was at home with flu, and said: "That's the best medication I'd say.
"He ran a great race last year but we were frightened of the ground today and we only ran him because it was York I think.
"He relaxed in front and we left it all to Tony.
"He didn't have a great experience in Dubai (last year) and he can be quite keen but Tony gets the credit for getting him to relax in front."
Hamilton said: "He's tough, he can be keen but Robin (O'Ryan) left it to me today and they said put your hands on his neck and see where he lands.
"We landed in front so I rode a race from the front.
"His form tailed off but he kept running on bad ground and we nearly pulled him out today because of the ground.
"I wasn't sure if I'd won."
Owner Glen Clayton said: "I wanted a diamond ring but I got the horse instead. He's been more fun than a diamond ring.
"I didn't think he was going to win, I wasn't confident at all, I thought the ground had gone against him."
Doumen said of the runner-up: "I'm never pleased, especially when I'm beaten a couple of inches.
"He lost the race with the storm yesterday because that was not his ideal surface, but he's proved he's improved from last year, he's proven that he can stay which was a doubt, according to the press.
"It was a big test today on ground he doesn't like but I'm happy that we've got a good horse.
"He's a bit lazy and he has to be pushed along, but he has a kick at the end."