Facebook said on Monday it will appoint a representative in Turkey to comply with a new social media law aimed at forcing platforms to quickly remove contentious posts.

The US social media giant’s announcement came a day before it and other non-complying platforms were due to face advertising bans in Turkey.

Media freedom advocates view the law as part of President Recep Tayyip Erdogan’s effort to limit political discourse and stifle dissent -- a drive that gained added momentum after he survived a failed coup in 2016.

But Facebook said its decision did not mean it was changing the way it handles government requests to take down content.

It said its representative would be withdrawn if Facebook felt it was being forced to compromise on its principles and community standards.

"We would like to underline the importance of our platform as a place where users can exercise their right to freedom of expression," Facebook said in a statement.

Turkey's new social media regulations entered into force in October after being rammed through parliament by Erdogan's ruling party.

They require platforms with more than one million unique daily users to appoint representatives who can handle court orders to take down offending content within 48 hours.

Facebook's continued refusal to appoint an envoy threatened to see its bandwidth cut by 90 percent in May.

Turkey's deputy minister for infrastructure Omer Fatih  Sayan tweeted that Monday's decision also covers Facebook-owned Instagram.

Access to websites and content had already been partially restricted in the nation of 83 million people before the latest regulations entered into force.

Twitter last year listed Turkey - along with Russia and Japan - among the top three countries responsible for 86 percent of all requests to take down posts.

Social media firms have diverged in their approach to Turkey's new law.

Facebook's Russian equivalent VK opened a local office in November but Twitter and YouTube along with Facebook all got fined that same month for failing to comply.

The Chinese short videos app TikTok said it would open a Turkish office earlier this month.

Twitter has not yet announced a decision to name a Turkish envoy.