Facebook said Tuesday it would file a legal challenge against a Thai government order to take down a group where pro-democracy activists held discussions about the monarchy, a taboo subject in the country.
A growing tide of youth-led protests has swept Thailand in recent weeks -- buoyed by anger against what many regard as an illegitimate, military-aligned government and an overly powerful royal family.
The private Facebook group, called "Royalist Marketplace", was created in April and had more than a million members before it was taken down on Monday.
A Facebook spokesperson told AFP the network had been "compelled" by the government to remove the group.
"Requests like this are severe, contravene international human rights law, and have a chilling effect on people's ability to express themselves," the platform said.
"We work to protect and defend the rights of all internet users and are preparing to legally challenge this request."
The company did not give details of the legal action, but warned that such requirements would undermine its ability to reliably invest in the country.
Prime Minister Prayut Chan-o-cha insisted his government's actions had been completely above board.
"We took action against this (Facebook) page under our laws. We haven't done this as a dictatorship," he told reporters on Tuesday.
"Everyone must respect the law of each country... anyone who chooses otherwise, must be very careful," he said, adding that Thailand would defend itself if any lawsuit is brought against the country.
Pavin Chachavalpongpun, an exiled Thai activist based in Japan and moderator for the group, told AFP it had been a place for "genuine discussion" on the monarchy, including its political role and protesters' proposals for reforms.
Thailand's biggest recent pro-democracy rallies have seen up to 20,000 turn out on the streets, in a movement partly inspired by the Hong Kong protests last year.
- 'Facebook should fight' -
The Thai monarchy has long been a taboo subject and is shielded by a harsh royal defamation law, under which people can be sentenced to up to 15 years per charge.
King Maha Vajiralongkorn is hugely powerful, supported by the arch-royalist military and the country's billionaire clans.
Since ascending the throne, he has amassed direct control of the palace's fortune, estimated to be worth up to $60 billion.
Protesters are calling for more transparency of palace finances and for the defamation law to be scrapped -- as well as the dissolution of parliament and a new constitution.
Prime Minister Prayut is the former army chief, who led a military coup in 2014 before being elected in polls last year.
Activists say the vote was stacked in his favour thanks to a constitution scripted by the military.
Pavin said the group's removal by Facebook showed the company was working to "promote authoritarianism" in Thailand, and "endorsing the government's tactic in censorship of information".
"It has become a part of obstruction of democratisation process in Thailand, as well as of free speech."
Human Rights Watch slammed Thailand for using "rights-abusing laws" to crack down on freedom of expression.
"Facebook should fight the government's demands in every forum it can to protect Thai people's human rights," said Asia Advocacy Director John Sifton.
So far 11 activists have been arrested on various charges, including sedition and breaking coronavirus gathering rules, but nobody has yet been charged under the royal defamation law.
On Tuesday morning, prominent activist and human rights lawyer Anon Numpa, 35, was arrested for the third time in relation to the protests.
A small royalist counter-demonstration also took place outside the Japanese embassy with protesters demanding Tokyo deport Pavin back to Thailand to face lese-majeste charges.