Best Solution has won the $5 million Group One Caulfield Cup in a photo finish from the Lloyd Williams-trained Homesman, with The Cliffsofmoher coming home in third.

Ridden by Pat Cosgrave, who became the second Northern Irishman to win the race, Best Solution recovered from a bad start to follow Taj Mahal at 600 metres to go and hold on for the win.

The victory gives Sheikh Mohammed and the famed Godolphin stable and trainer Saeed bin Suroor their second Caulfield Cup after All The Good won in 2008.

"God, you know it's hard to believe I actually won," Cosgrave said.

Loading

"I had a bad trip around, Saeed was adamant we need to be forward and handy. I had to work so hard to get to where I was. An unbelievable performance."

"My horse is a good stayer. He toughed it out. It was a battle, he stays well, hard and tough."

Saeed bin Suroor was thrilled to cap off a fine year, that has seen the Godolphin trainer win eight Group One races, with a second Caulfield Cup victory.

"After he won two Group One races in Germany, to come to Australia to win another Group One is brilliant." bin Suroor said.

"It was a brilliant race and a brilliant result for him."

Pre-race favourite Kings Will Dream had a bad start to drop a couple of lengths and never recovered, finishing sixth after being caught in traffic during a chaotic race.

Jockey Craig Williams revealed after the race that Kings Will Dream stumbled out of the gate and injured himself.

"It was a shame, I was confident going into the race and he had handled the day well. The gates opened, he was slow, he stepped reasonably, had another stride then almost fell over and nearly dislodged me."

"He cut himself badly after caught his balance nearly falling … he overreached and stood on the back of his front leg, caused a gash and there was a pool of blood when I unsaddled him."

Best Solution won the Caulfield Cup in a photo finish from Homesman. ( AAP: Julian Smith )

Ace High lead the field around the bend through to 800 metres to go, when Taj Mahal injected some pace to leap into the lead from four lengths back, dragging Best Solution into contention.

For Cosgrave, who was set to fly back to Britain tomorrow but is staying to ride next week at Mooney Valley, the result was one of the thrills of his racing life.

"It's got to be," Cosgrave said.

"It was such hard work, I'm surprised he was able to keep doing. It was a big day. Caulfield is a great place."

On a track that has been downgraded from a good four to soft six by the time of racing, Best Solution recovered from a bad start to follow an injection of pace from Taj Mahal with 600 metres to go, holding off a fast-finishing Homesman for the win.