The Hart-Agnew Law was an anti-gambling bill passed into law by the Legislature of the State of New York on June 11, 1908. It was an amalgam of bills enacted as Chapter 506 and 507 which were sponsored by right-wing Assemblyman Merwin K. Hart and Republican Senator George B. Agnew. 
For more than a decade, moral activists, including the Young Men's Christian Association,  had demanded New York enact legislation similar to that passed in 1898 by the state of New Jersey which banned both gambling and horse racing.  Newly elected Republican Governor of New York, Charles Evans Hughes would advocate changes to gambling laws and in January of 1908 he recommended the repeal of the Percy-Gray Law of 1895 and replace it with strict new anti-gambling legislation that would provide substantial fines and a prison term for those convicted of betting. 
Effect on horse racing
Although the Hart-Agnew law was regularly referred to as the anti-racing law, , horse racing did continue under the interpretation that oral betting between patrons was still legal. However, Governor Hughes ensured the law was strictly enforced  and on June 15, 1908 the New York Times reported that 150 police officers plus more than fifty in plain clothes arrived at Gravesend Race Track on Coney Island to uphold the new law.  Their instructions were to arrest men who congregated in groups of more than three plus arrest anyone who was seen writing anything on a newspaper, racing program or even a piece of plain paper that might be construed as betting.
Despite opposition from prominent owners such as August Belmont, Jr. and Harry Payne Whitney, right-wing legislators were not happy that betting was still going on at racetracks and they had further restrictive legislation passed by the New York Legislature in 1910  that made it possible for racetrack owners and members of its Board of Directors to be fined and imprisoned if anyone was found betting, even privately, anywhere on their premises. After a 1911 amendment to the law to limit the liability of owners and directors was defeated,  every racetrack in New York State shut down. The economic ramifications were substantial and especially hard hit was the town of Saratoga Springs, New York where entrepreneurs had made substantial investments in a variety of businesses to serve the racing industry and its patrons. Numerous Saratoga businesses went bankrupt, hotels suffered a sharp decline in guests, and real estate values collapsed. Owners, whose horses of racing age had nowhere to go, began shipping them and their trainers to England and France. Many ended their racing careers there, and a number remained to become an important part of the European horse breeding industry. Thoroughbred Times reported that more than American 1,500 horses were sent overseas between 1908 and 1913 and that of them, at least twenty-four were either past, present, or future Champions. 
Due to the turmoil surrounding the industry following the close of the New Jersey racetracks in 1898, a number of top American jockeys such as Guy Garner, Tod Sloan, Danny Maher, Skeets Martin, Winfield O'Connor, Frank O'Neill, John Reiff, Lester Reiff, and Nash Turner had already gone to Europe to make a living. With the closure of the New York tracks, more top jockeys left the country.  By 1917 the large majority of jockeys and trainers returned to the United States but several never did. 
Racing returned to New York after a New York court ruled that oral betting was legal as the Hart-Agnew law only covered bookmakers.   Owners were tentative at first, but the economic impact on New York State was such that legislators left the industry alone. The Brighton Beach Race Course, Gravesend Race Track, and the Sheepshead Bay Race Track were never able to reopen.
- January 14, 1912 New York Times article titled "AMERICANS PROSPER ON FRENCH TRACKS; Anti-Betting Laws in the United States Drive Owners and Jockeys to New Fields."