(Elsa/Getty Images)

The 138th Kentucky Derby attracted an all-time record crowd of 165,307 to Churchill Downs Saturday, according to figures released by the track yesterday. The previous record of 164,858 was set last year, breaking a record which had been set in 1974.

Wagering from all-sources on the card also set a record, with the $187 million breaking the 2006 mark of $175.1 million. All-sources wagering on the Derby itself was a record $133.1 million.

Also setting a new mark, on-track wagering on the Derby was $12.3 million. On-track wagering on the whole card was $23.7 million–up 1.3% from the 2011 figure. Churchill Downs returned $153.3 million, or 82% of the total wagers, to bettors and generated almost $1 million in taxes to be paid to the Commonwealth of Kentucky.