By Ian Ransom

MELBOURNE (Reuters) - German import Almandin won a thrilling sprint to the line to claim the A$6.2 million ($4.75 million) Melbourne Cup at Flemington Racecourse on Tuesday.

Roared on by a festive crowd of more than 100,000 people, Almandin emerged at the final turn to haul in Heartbreak City by a neck at the end of the grueling two-mile handicap.

It gave local businessman Lloyd Williams a record fifth Melbourne Cup as an owner and jockey Kerrin McEvoy his second trumph after his win on Brew in 2000.

The seven-year-old gelding's Australian trainer Robert Hickmott also claimed his second Cup in its 156th running, having prepared 2012 winner Green Moon.

"Jeez, he traveled well," McEvoy said from the saddle, having timed the 11-1 shot's run to perfection.

"How lucky am I, mate? The elation is just unreal.

"Just a dream, mate, to win my second Cup. It's just a dream come true. I love these staying races, I love the Melbourne Cup."

McEvoy set a record for the longest gap between Cup wins for a jockey and his triumph came less than a week before his wife Cathy Payne, the sister of last year's winning jockey Michelle Payne, was due to have their fourth child.

"Cathy's at home, love you guys, hope you didn't cheer too loudly and the baby popped out," the 36-year-old said.

Heartbreak City, ridden by Hong Kong-based Brazilian Joao Moreira, was a gallant runner-up after leaping from barrier 23.

Trained by Irishman Tony Martin, the seven-year-old gelding was the first to bolt for the line and all but captured Australia's richest horse racing prize before conceding at the line.

"He didn't break my heart, he tried 120 percent," said Moreira.

"I'm very proud of the horse. If you look at him you wouldn't think he was that good, but when he went at the end he showed what he was capable of.

"From the 50 (meter mark), I knew my horse was getting weak, he started getting tired, and the other one had a little bit left and he got me at the line."

Favorite Hartnell finished third, continuing the frustrations of the powerful Godolphin stable which had five entrants in the field of 24.

Godolphin, owned by Emirati Sheikh Mohammed bin Rashid Al Maktoum, have tried in vain to win a Melbourne Cup since 1998, but managed only three runner-up finishes.

The stable's British stayer Qewy was fourth, while Jameka, the sole locally bred entrant, disappointed in 15th place, having started second favorite after winning the prestigious Caulfield Cup last month.

($1 = 1.3065 Australian dollars)

(Reporting by Ian Ransom, editing by Nick Mulvenney)