(CNN) -- Long-shot Ruler on Ice won the 143rd running of the Belmont Stakes in New York on Saturday, beating 24-1 odds.
It was an astonishing win in a race billed earlier as a rematch between rival horses Shackleford and Animal Kingdom, both of which had been competing to win a second leg of the Triple Crown.
Animal Kingdom nearly tossed his jockey at the start and fell behind early, while Shackleford came out of the gate strong and held the lead for much of the race. But he lost it at the end.
Favorites fell by the wayside as Ruler on Ice was followed by Stay Thirsty and Brilliant Speed in second and third place.
"I'm a couple yards from the wire and I'm thinking, 'Oh my God, oh my God, I'm going to win the Belmont!' " said Ruler on Ice jockey Jose Valdivia, his voice breaking with happy emotion.
"What can I tell you, it's just one of those things," he said. "You get into your zone where everything stops ... unbelievable feeling."
Shackleford held off Kentucky Derby winner Animal Kingdom in the Preakness Stakes in May.
No horse has won the Triple Crown -- defined as the feat of sweeping the Kentucky Derby, the Preakness Stakes and the Belmont Stakes -- in 33 years.
Twelve horses competed in Saturday evening's dash around the mile-and-a-half track, which was sloppy with rain.
Shackleford, with 6-1 odds, finished fifth. Animal Kingdom, with 5-2 odds, came in sixth.
"We always had a lot of confidence in this colt and we can't be more thrilled with the outcome," said Ruler on Ice owner George Hall.
CNN's Lateef Mungin contributed to this report.