Updated at 9:05 p.m. ET
In a stunning and historic Kentucky Derby upset, the horse that crossed the finish line first was not the one that was declared the winner.
Maximum Security, the favorite entering the race and the only undefeated horse in the field, outpaced the competition on the muddy track at Churchill Downs and appeared to have won the 145th Kentucky Derby with a time of 2:03.93.
Then an objection was lodged. For several tense minutes in Louisville, some 150,000 people in rain-soaked ponchos and fancy hats waited for a verdict.
About 20 minutes after the race ended, the race's stewards announced that Maximum Security had been disqualified for impeding the path of at least one other horse in the race. The decision handed the victory to Country House, which started the race at 65-1 odds, and a first-time win to Hall of Fame trainer Bill Mott.
It's the first time a horse has been disqualified for interference in the history of the race. The result also ended a six-year streak of favorites winning the derby.
Code of Honor finished second (13-1) and Tacitus (5-1), also trained by Mott, took third.
"It's amazing," Country House's jockey Flavien Prat, told NBC Sports after the result was announced. "I really kind of lost my momentum around the turn, so I thought that I was going to win, but it cost me, actually."
At a press conference after the event, Mott said he was happy with the way his horse and jockey performed.
"As far as the win goes, it's actually bittersweet," he said. "I'd be lying if I said it was any different."
He acknowledged that the stewards had to make a challenging decision but said the disqualification was warranted because of Maximum Security's impact on other horses.
Maximum Security's trainer, Jason Servis, and the horse's jockey, Luis Saez, had already begun to celebrate what they believed were their first Derby victories before the stewards began reviewing the objection.
Mott said he expected that the controversy surrounding the incident would reverberate for a long time. "I wouldn't be surprised if this race shows up on TV over and over and over a year from now," he said.
It was also a bittersweet victory for co-owner Maury Shields, whose husband, Joseph "Jerry" Shields, died last year. The prominent thoroughbred owner-breeder had served on several racing boards and was a founding member of the National Thoroughbred Association, according to the horse racing website the Paulick Report.
Only one other horse has been disqualified after finishing first in the race. Dancer's Image, who ran in the 1968 Derby, was disqualified years later for a failed drug test.
Maximum Security was the race favorite heading into the Run for the Roses, with odds at 4-1 by the evening.
A light drizzle, which followed hours of overcast but dry skies, turned into heavier rain just in time for the race and drenched the main track. Shortly before the race began, the track was downgraded from fast to sloppy.
Last year, several inches of rain also made for a sloppy track. Justify, the favorite, took home that victory.