Thais face jail if they campaign during Sunday's election on social media sites such as Twitter, with more than 100 police monitoring sites to make sure the law is enforced.
People will not be able to comment on any candidate or party in the election, which many hope can revitalize democracy after six years of crisis, from 6 p.m. (1100 GMT) on Saturday until midnight on Sunday when the results should be known.
Polls open at 8 a.m. on Sunday and close at 3 p.m.
Any candidates and their supporters will face jail time if they are caught campaigning on social media websites on the evening before the July 3 election, said Suthiphon Thaveechaiyagarn, secretary-general of the Election Commission.
Offenders face a maximum six months in prison and a 10,000 baht ($330) fine. Saturday evening is a cooling-off period with all campaigning banned.
The ban includes sending short telephone texts and forwarding emails. The sale of alcohol is also banned over the same period, as normal in Thailand during elections.
The law on political campaigning through online media is not new, but it has only become an issue as sites like Facebook and Twitter have grown popular in Thailand in recent years.
There will be a unit of more than 100 officers to monitor this, said police spokesman Prawut Thavornsiri of the social media ban.
If we can track the origin of (an online message) right away, we will block the site and make an arrest. But if the sites are registered overseas and we can't check the origin, we'll first block it and ask the IP (Internet Protocol) providers for further investigation, Prawut said.
Pavin Chachavalpongpun, of the Institute of Southeast Asian Studies in Singapore, said the law was bizarre but not surprising from a government that has shut down thousands of websites since coming to power in December 2008.
It will be impossible to stop people from doing it. We are living in a digital age and meant to be promoting democracy. Why come up with this?
The law also has a darker side, with implications on the way the information is used in future.
Of course, there's a possibility that this could be seen as a tool for disqualifying winning candidates, said political analyst Sukhum Nuansakul, a former lecturer at Bangkok's Ramkhamhaeng University.
I think, the point here is that they want to stop people from possible cheating and last-minute campaigning but again they have to be very clear about who is really a wrongdoer. You shouldn't be charged if your friend sends a text message trying to convince you to vote for someone.
Kanitha Boonmak, a 30-year-old office worker in downtown Bangkok, said if the ban meant stopping people from sending malicious messages and defaming others, she would agree with it.
But if it's there only to stop us from having an opinion, I don't think that's fair, she said. We should be able to speak our minds.
(Additional reporting by Nick Macfie; Editing by Robert Birsel)