In a historical reversal, Country House was declared the winner of the 145th running of the Kentucky Derby at Churchill Downs on Saturday following “an inquiry ruling” and the disqualification of Maximum Security, officials said.

The disqualification marked "the first time in 145 years" that "the horse who finished first in the Kentucky Derby was disqualified," the official Twitter account for the sporting event said.

Country House was a 65-1 longshot in the race, which included 18 other competitors. Maximum Security crossed the finish line first amid sloppy conditions, only to be disqualified after an objection was filed, claiming that the horse had interfered with the path of multiple horses.

Stewards spent roughly 20 minutes going over video of the race from various perspectives before ultimately declaring Country House the winner.

The horse's jockey, Flavien Prat, celebrated following the announcement. It was the first Derby win for both Prat and trainer Bill Mott.

Code of Honor was second, with Tacitus third. Maximum Security was listed as coming in 17th place.

Earlier this week, Omaha Beach -- at the time favored to win the Kentucky Derby -- was scratched from the competition due to a breathing problem.

Trainer Richard Mandella told The Associated Press that the horse had developed a cough; a subsequent veterinary exam showed the colt had an entrapped epiglottis. The condition is generally not life- or career-threatening and is typically corrected with minor surgery.

The Associated Press contributed to this report.