Authorities in Thailand appear to have backed down on a threat to block access to Facebook after they said the social media company had agreed to remove “illegal” content, including posts critical of the monarchy.

The government threatened Facebook with legal action last week unless it removed 131 “illicit” pages by 10am on Tuesday morning. Hours before the deadline, internet providers said they were under pressure to shut down access to Facebook in Thailand.

The brinkmanship appeared to have worked, with the secretary general of the National Broadcasting and Telecommunications Commission announcing after the deadline that Facebook was cooperating.

“We found Facebook did not block the remaining 131 posts because it has yet to receive the original court orders to block them,” Takorn Tantasith said. “After Facebook received the original court orders, it blocked them within 24 hours.”

The Bangkok Post reported earlier that the Thai Internet Service Provider Association (Tispa) may disconnect access to Facebook’s servers.

It cited an email purportedly sent from Tispa to the managing director of Facebook Thailand warning that if the company did not remove all 131 pages, “concerned authorities will request that we shut down” access to the site.

“This action may affect the entire delivery services of www.facebook.com to customers in Thailand,” Tispa wrote, according to the Bangkok Post.

The Guardian was unable to immediately corroborate the report and Facebook did not respond to queries related to the incident.

A Facebook spokesperson said the company reviewed requests by governments to restrict access to content. “When we receive such a request, we review it to determine if it puts us on notice of unlawful content.

“If we determine that it does, then we make it unavailable in the relevant country or territory and notify people who try to access it why it is restricted.”

The Thai government has not publicly released details of the posts it wanted removed.

Several images and a video appearing to show the Thai king, Maha Vajiralongkorn, 64, wearing a crop top and covered in tattoos have been published on social media in recent weeks.

Facebook opened an office in Thailand in 2015 and is the biggest social network in the country.

The military-run administration briefly cut access to Facebook after it launched a coup on 22 May 2014.

The royalist junta has ramped up online censorship, especially any posts or comment perceived to violate the country’s strict lese-majesty laws, which make it a crime to criticise, defame or insult members of the royal family.

Sensitivity to public criticism of royal affairs was heightened after the much-loved king Bhumibol Adulyadej died in October and his son took power.

With each offence punishable by up to 15 years in jail, more than 105 charges have been raised during the junta’s tenure, several of them related to sharing online posts.

Lese-majesty laws force media operating in Thailand to frequently self-censor.

Agence France-Presse contributed to this report.