Facebook is preparing to mount a legal challenge to the Thai government order that this week forced it to block content posted by an anti-monarchist group.

Facebook began blocking access within Thailand to a group called Royalist Marketplace, which was formed in April and had over a million followers. The site “provides a platform for serious discussion on the monarchy,” according to its creator.

Criticism of the monarchy is illegal in Thailand under strict lese majeste laws. The Thai government warned Facebook that it needed to comply with the Computer Crimes Act and that it would be sued if it did not remove Royalist Marketplace by Tuesday.

Facebook complied, earning considerable criticism online, but it seems to want to test the matter in court.

“After careful review, Facebook has determined that we are compelled to restrict access to content which the Thai government has deemed to be illegal. Requests like this are severe, contravene international human rights law, and have a chilling effect on people’s ability to express themselves,” a Facebook spokesman said in a statement emailed to Variety. “We work to protect and defend the rights of all internet users and are preparing to legally challenge this request. Excessive government actions like this also undermine our ability to reliably invest in Thailand, including maintaining an office, safeguarding our employees, and directly supporting businesses that rely on Facebook.”

Pavin Chachavalpongpun, a Thai academic who set up the Marketplace, and who now lives in exile in Japan, quickly set up another site on Facebook, with a similar name. Within 24 hours the new site had gathered over half a million adherents.

Thailand is a constitutional monarchy, and a country with a strong Buddhist tradition of respect for elders and for authority. But as the country has emerged from coronavirus lockdowns, it has been rocked by a growing number of street demonstrations, and flash mob events.

Often led by students, these initially took an anti-government and anti-military tone. Many people allege that the government, which is headed by the leaders of the 2014 military coup, was not democratically-elected and that it is unnecessarily prolonging a coronavirus-sparked state of emergency in order to hold on to power. They allege it is both corrupt and lacking competence.

In recent days, however, some of the demonstrations have taken a more openly anti-monarchy tone. They criticize the monarchy and the military as reinforcing each other.

Mainstream media has also been severely criticized, either for spouting government propaganda or for self-censoring itself so heavily that reports of the demonstrations are relegated to the inside pages. Foreign TV outlets, such as the BBC, have seen their transmissions in Thailand blacked out by internet service providers at times when they were reporting on the anti-government demonstrations.

Social media, therefore, has become the primary news source for many in Thailand, the vector for expressing opinions, and for organizing opposition. The government increasingly sees social media as something it needs to control. The internet around Bangkok’s Democracy Monument was cut off during the major Aug 16 rally.

Facebook, which also operates the WhatsApp and Instagram apps, is understood to have held multiple meetings with Thailand’s Ministry of Digital Economy and Society, to understand government concerns, and to share experience from other parts of the world.

Facebook is understood to have expressed concern about the government’s content requests which attempt to stifle peaceful political speech and especially its use of the Computer Crimes Acts as a de facto replacement for the lese majeste laws.

It is expected that Facebook will appeal against the MDES’ orders filed against Facebook Thailand under the Computer Crimes Act, and ask the court to decide on the legality and the constitutionality of the orders.

“Thailand’s government is again abusing its overbroad and rights-abusing laws to force Facebook to restrict content that is protected by the human right to free speech,” said John Sifton, the Asia advocacy director at Human Rights Watch, in a statement.