Facebook has decided to defy a new law in turkey requiring social media companies to establish a formal presence in the country, setting the stage for a showdown with the government of recep tayyip erdogan that could culminate in the platform being blocked.

The san francisco-based company informed the turkish government in recent days that it would not be complying with the legislation, which went into force last week, said two people familiar with the matter.

The decision will be welcomed by human rights campaigners who had urged technology companies not to bow to requirements that they described as draconian and a fresh attempt by mr erdogans government to muzzle free speech.

But it opens facebook up to penalties including escalating fines and a reduction of its internet bandwidth by as much as 90 per cent a move that would make the platform impossibly slow to use for the 83m people living in turkey.

Yaman akdeniz, a turkish academic and cyber rights campaigner said he was informed on monday by a facebook representative of the companys decision. the social media group felt that the law was a restrictive regime that it did not want to be part of, he said.facebook declined to comment.

Mr erdogan, president, earlier this year declared that he wanted immoral social media platforms to be either completely banned or controlled after twitter users posted harsh personal attacks against his daughter and son-in-law after the birth of their fourth child.

His comments were quickly translated into law, as parliament passed a contentious bill proposed by the ruling party that was decried by opposition parties and human rights groups. it requires technology companies with more than 1m daily users in turkeyto store user data in the country and appoint a local representative who would be accountable to the authorities, or else face punitive measures.

The international press institute, a campaign group, warned that it would greatly expand digital censorship and threaten media freedom.

Twitter and other large social media platforms have issued no public indication of their plans.

Mr akdeniz was among those who had urged tech companies not to comply with the demands, warning that it would make them the long arm of the turkish law enforcement regime.

He welcomed facebooks decision. i was hoping that they would decide in this way, he said. i dont think it was easy because there are business interests [in turkey for facebook]...it will be a major blow to turkeys plan to control social media.

Facebook claims to have 37m users in turkey who can be reached through advertising on the platform, according to a report published earlier this year by we are social, and hootsuite.

But the company has no physical office in the country, and all employees with roles related to its turkish service are based in london. it has decided that it will not change that policy despite the pressure from the turkish government to do so.

It remains unclear whether turkish authorities will follow through on their threats to punish non-compliant social media platforms by rendering their platforms unusable. googles youtube did not immediately respond to request for comment on whether it plans to comply with the new rules. twitter declined to comment. turkeys information and communication technologies authority could not be reached for comment late on monday.

While turkey has temporarily banned youtube, twitter and wikipedia at various points over the past decade, analysts have pointed out that the ruling party itself also relies on social media to spread its political messages especially among the countrys large population of young people.