TOKYO — Japan is dealing itself into the multibillion-dollar casino industry.

Lawmakers have cleared the way for blackjack, roulette and other casino games in the country, approving legislation that removes a longstanding prohibition against gambling.

The legislation, passed on Thursday, is a major victory in a longstanding effort to make Japan attractive to gamblers. For years, Japanese businesses and the tax authorities have watched enviously as vast sums have poured into jurisdictions like Macau and Singapore, which have built sparkling casino resorts catering to international gamblers, especially those from China.

Japan is experiencing its own boom in Chinese tourism, and it sees casinos as an added way to cash in. Estimates of the potential size of the industry have ranged as high as $40 billion a year.

International casino operators see a chance to profit, too. The last time Japanese legislators took up the issue, in 2014, Sheldon G. Adelson, the billionaire chief executive of Las Vegas Sands, said his company would be willing to invest as much as $10 billion to develop a casino resort in the country.