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."

A growing tide of pro-democracy protests has swept Thailand in recent weeks
A growing tide of pro-democracy protests has swept Thailand in recent weeks AFP / Lillian SUWANRUMPHA

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.

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.

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.

Prominent activist and human rights lawyer Anon Numpa was arrested for the third time in relation to the protests
Prominent activist and human rights lawyer Anon Numpa was arrested for the third time in relation to the protests Lillian SUWANRUMPHA / Lillian SUWANRUMPHA

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.

The prime minister 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.