Facebook has blocked access to scores of web pages in Thailand with "inappropriate" content, including some containing alleged insults against the royal family, on the orders of the country's criminal court.

The National Broadcasting and Telecommunications Commission (NBTC) told reporters on Thursday that Facebook has restricted local users' access to 178 out of some 309 pages on the criminal court's blacklist.

Facebook Thailand will face legal action if it fails to block the remaining 131 pages, the NBTC warned.

READ MORE: Facebook deletes tens of thousands of UK accounts

The social network giant did not confirm the number of pages it had blocked, but told the DPA news agency that it restricts access to content if it determines that local laws were violated.

Thailand's criminal court has ordered nearly 7,000 "inappropriate" web pages be shut down since 2015, according to the Ministry of Digital Economy and Society,

Under Thailand's lese majeste or royal insult law, criticism of the royal family is an offence punishable by up to 15 years in prison.

Internet service providers are able to block access to most pages, but said some 600 could not be shut down because of encryption. More than half of these were on Facebook.

READ MORE: Thai lawyer faces 150 years in jail for royal insult

The UN Human Rights Council declared access to the internet to be a human right in July 2016.

David Kaye, the UN's rapporteur on freedom of opinion and expression has also encouraged companies to "push back" when states request a block on web pages.

"They should ask questions so they don't just do it right off the bat," he said in an interview with Al Jazeera this week. "They need to make the countries explain themselves at the very least, to mitigate the risk."

Kaye has previously criticised the Thai authorities for using lese majeste laws "as a political tool to stifle critical speech".

The military government has cracked down on lese majeste suspects since it took power in May 2014, arresting more than 100 people on charges of insulting or defaming the royal family.