The Japan Cup now has a $5.25M purse, making it one of the most lucrative in the world.

While Criminal Code chapter 23 generally bans gambling in Japan, there are some exceptions, including certain motor sports and horse racing, which the public can legally gamble on. And in the case of the latter, the people of Japan make the most of it having wagered some $22.5 billion throughout the country in 2015, according to CNN. This year, the Japanese public has for the first time been able to legally bet on foreign races.

Jump racing, flat racing, and Ban’ei Racing, or Draft Racing, are the three types of racing in Japan, which holds more than 21,000 horse races each year. The sport is organized by the National Association of Racing (NAR) and the Japan Racing Association (JRA), with the latter being responsible for horseracing events at 10 major racecourses in larger metropolitan areas. The former oversees various local horse racing events throughout the country. This administration system of horse racing is unique to Japan.

According to a Deadspin article on horse racing in Japan, in 2013 288 race days were put on by the JRA and in the same year, the betting turnover on all Japanese racing, most of which was handled by the JRA, was about $30 billion. That is almost three times the amount wagered on American races, despite the fact that American tracks run three times as many races and the U.S.’ population is almost triple that of Japan. In 2014, approximately 21 percent of all horse racing bets around the world were taken in Japan, according to the sports website article.

As for this year’s Prix de l’Arc de Triomphe, a Group 1 flat horse race that takes place in France, and ran in October, Japan placed more than two times the value of bets than were made in France, according to CNN. Run at Longchamp every year usually on the first Sunday in October, it is Europe’s most prestigious and richest horse race.

Japanese horse racing analyst Naohiro Goda, told CNN’s Winning Post show that gambling has helped the sport grow in Japan. He said, “We have only four subjects that we can bet on in this country, so this is quite a rare opportunity for us to enjoy gambling,” adding that, “this is one reason why horse racing is so popular here … The Japanese are very much enjoying placing their money on foreign races.”

Racing prize funds in Japan are fattened further with the profit that is created by betting, which the JRA reinvests into the funds, making its meetings among the most lucrative in the world now. One example of that is the Japan Cup, with this year’s purse being a cool $5.25 million. Japan’s gambling public wagered more than $179 million on what is the country’s top stakes race.

On December 15, the Japanese Diet approved the controversial “Bill Promoting Implementation of Specified Integrated Resort Areas”, that will allow high stakes gambling in Japan for the first time. The bill consists of 23 articles and outlines the general principles and basic policies for promoting “Specified Integrated Resort Areas” in Japan.