Facebook is planning to take legal action against Thailand’s government after it ordered the US tech giant to ban a group that has been critical of the country’s monarchy.

The ‘Royalists Marketplace’ Facebook group had more than one million members before Facebook blocked local access to it on Monday night at the request of the Thai government.

“Requests like this are severe, contravene international human rights law and have a chilling effect on people’s ability to express themselves,” Facebook said.

“We work to protect and defend the rights of all internet users and are preparing to legally challenge this request.”

Thailand’s lèse majesté laws make it illegal to defame or insult the ruling monarch and can incur prison sentences of up to 15 years.

Earlier this month, the country’s Digital Minister, Buddhipongse Punnakanta, gave Facebook 15 days to remove some 1,100 pages that contravened Thailand’s Computer Crimes Act.

The minister threatened Facebook with a fine of up to 200,000 baht ($8,850) and a further 5,000 baht ($220) for each day it did not comply.

Creator of the ‘Royalist Marketplace’ group, Pavin Chachavalpongpun, was disappointed with Facebook’s choice to relent to Thailand’s government.

“The Royalists Marketplace is a part of the democratisation process. It is a space for freedom of expression,” Pavin said.

“The government’s action is the crudest form of information censorship. It crushes the freedom of expression that we are all entitled to.

“By doing this, Facebook is cooperating with the authoritarian regime to obstruct democracy and cultivating authoritarianism in Thailand.”

Shortly after his page was removed, Pavin created a new group which was quickly joined by over 500,000 members.

Protesters have taken to the streets this month, calling for improved democratic involvement from citizens and a less powerful monarchy.

Thailand Prime Minister, Prayut Chan-o-cha, defended his government’s actions in forcing the removal anti-monarchy Facebook groups.

"All actions against offending pages comply with Thai law,” he said.

“I do not use any dictatorial power that I no longer have to close them. These actions are based on court orders.”

Thailand forced Facebook to remove around 1,400 posts under its lèse majesté laws last year, according to the company’s Transparency Report.

The number of takedowns has been rising in Thailand in recent years, with Facebook reporting 869 removals in 2018 and fewer than 500 restrictions in 2017; the vast majority are removed because of the lèse majesté laws.