The Diet on Friday enacted a bill authorizing the opening of casino resorts, despite stiff resistance from opposition parties and widespread public concern about gambling addiction.

The bill was passed in the House of Councilors after a filibuster by opposition leader Yukio Edano, which continued for two hours and 43 minutes. Edano heads the Constitutional Democratic Party of Japan.

The law will allow the establishment of casinos in up to three locations as part of integrated resorts incorporating hotels as well as conference and shopping facilities

The more powerful House of Representatives endorsed the bill about a month ago.

By legalizing casino gambling, the government of Prime Minister Shinzo Abe says Japan will be able to attract more foreign visitors and revitalize regional economies outside Tokyo. Opposition parties have argued it will only increase the number of people addicted to gambling.

The first integrated resort will likely open in the mid-2020s after the government spends some time selecting locations — with Nagasaki, Osaka and Wakayama prefectures as well as Hokkaido having expressed readiness so far to host casinos.

The nation already has so-called legal public gambling, including horse racing and boat racing. But the scope of the casino legislation goes beyond that and critics have said discussions in the Diet were insufficient, while a number of issues remain unsolved including how to prevent a potential rise in crime.

Whether Japan can implement effective countermeasures against gambling addiction was also a major issue.

A government survey released last September estimated around 3.2 million adults in the country were grappling with gambling addiction, or had suffered from it in the past.

Still, the government has said the measures it has proposed will be among the best in the world, allowing local people to visit casinos up to just three times per week and 10 times per month by using government-issued My Number identity cards, embedded with IC chips, to count their visits.

Under the law, people living in Japan will be charged a ¥6,000 entrance fee for casinos, while foreign visitors will be able to enter free of charge.

A total of 331 detailed points of law will be decided afterward without Diet deliberations, including a system allowing casino operators to lend betting funds to players that legal experts argue could increase the number of addiction cases.

In terms of economic effects, calculations by the Daiwa Institute of Research said the construction of three facilities could initially generate an economic impact of ¥5 trillion, followed by ¥2 trillion annually once they open.

But it is unclear whether Japan will succeed in attracting wealthy foreign individuals as it is likely to face fierce competition from regional rivals, including Macau, Singapore and South Korea.

Some projections have shown Japanese nationals will account for between 70 and 80 percent of casino visitors, contrary to the government’s expectations of drawing more foreigners.

In Japan, de facto gambling has long been permitted in slot machine and pachinko parlors as these activities are categorized as gaming instead of gambling, but the average amount of money to be spent on casino bets is almost certain to be much higher.

Although a law allowing integrated resorts to open took effect in 2016, additional legislative steps to set out regulations on their actual operations were necessary.

In an attempt to ensure the enactment of the legislation the government and the ruling coalition parties extended the term of the parliamentary session, which was originally scheduled to end on June 20.