Maximum Security’s disqualification from the 145th Kentucky Derby was incredibly costly, even beyond the $3 million purse.

According to a report, bettors would have won over $42 million on 9-2 favorite Maximum Security, which helps explain why the eventual winner, Country House, was so heavily booed after it was announced he won.

Ed DeRose, the director of communication for TwinSpires.com, the online betting site for the Kentucky Derby, approximated the potential winnings based off of win, place, and show bets. Bettors placed $9 million on various bets for Maximum Security, including $6.2 million to win, $1.5 million to place and $1.3 million to show.

The $42 million figure could be even higher when considering exotic bets such as exacta, trifecta and superfecta.

Bettors were initially thrilled when Maximum Security looked like it would be the seventh straight favorite to win the Kentucky Derby. Maximum Security took an early lead and never gave it up, although officials took 22 minutes to review tape and ultimately disqualified the No. 7 horse.

In a unanimous ruling, three stewards decided that in moving over several lanes, Maximum Security impeded the path of War of Will and earned a disqualification. That handed the victory to second-place Country House, marking the first time that a horse lost based on breaking the rules.

Of course, when one door closes, another opens in gambling, and it paid off handsomely for anyone who bet on the 65-1 underdog Country House. Among the big winners was an Atlanta man who pulled in $147,000, to help pay for his wife’s medical bills, on several bets.

Luis Saez rides Maximum Security to the finish line during the 145th running of the Kentucky Derby. (AP) More

More from Yahoo Sports: