Japan's parliament passed Friday a bill authorizing the opening of casino resorts, despite stiff resistance from opposition parties and widespread public concern about gambling addiction.

The approval of the bill by the House of Councillors will allow the establishment of casinos in up to three locations as part of "integrated resorts," comprising hotels, conference rooms and shopping facilities.

The vote was held on the de facto final day of the six- month-long Diet session, after a panel of the ruling coalition-controlled chamber approved the bill on Thursday.

The more powerful House of Representatives already endorsed the bill about a month ago. The Diet session, which was extended for a month by the government in a bid to secure passage of the casino legislation and other controversial bills, will formally end on Sunday.

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.

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 so far expressing readiness to host casinos.

Japan 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 Japanese adults were grappling with gambling addiction or had suffered from it in the past.

Still, the government has said Japan's measures are among the best in the world as they will only allow local people to visit casinos up to 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 yen ($53) 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 scheme allowing casino operators to lend betting funds to players, which 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 yen and 2 trillion yen 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 would 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 they 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 on their actual operation 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.