The Sri Lankan parliament has passed a bill that fully regulates gambling for the first time.
The government says that this will help revive its tourism industry, after the end of a three-decade civil war.
The move stands in contrast to conservative social measures recently taken by the government.
The bill sparked opposition, but was passed by a large majority in a chamber overwhelmingly dominated by allies of President Mahinda Rajapaksa.
Gambling is not completely new to Sri Lanka. Flashing neon lights already entice the visitor into a number of casinos and to shops where people bet on foreign horse and greyhound races.
But these outlets have survived by exploiting legal loopholes and paying taxes to local authorities.
With the legal change, the national government will take charge of all gambling licences. A minister will have powers to create whole geographical zones where gaming businesses can be set up.
Anyone doing so without the licence will face a heavy fine and up to five years in prison.
A tourism official told the BBC that in the next six years Sri Lanka aims to boost tourism numbers by five times. Ministers say the new law will help boost that process.
However the main opposition leader, Ranil Wickremesinghe, alleged that the move was aimed at helping the government's friends, as he put it, to operate casinos.
The law contrasts with recent conservative moves by the government.
The police have been urging unwilling newspapers to publish the faces of local people who they say have been identified taking part in porn videos.
They have also launched a campaign against what they call lewd posters.
In a nod to conservative sentiment, the deputy finance minister says the new gaming zones will not be near temples, schools or highly populated areas.
A party dominated by Buddhist monks in the governing coalition expressed some unhappiness at the gambling bill but did not vote against it.