ISTANBUL (AP) — Twitter has announced it will establish a legal entity in Turkey in order to continue operating in the country, which passed a controversial social media law last year.

In a statement Friday, the social media company said it had reviewed the amended internet law and made the decision to comply with, it but promised to continue “defending open, public conversation and ensuring our service is available to people everywhere.”

Turkey slapped advertising bans on Twitter, Periscope and Pinterest in January. Those bans were the next step in a series of measures to force social media companies to maintain legal representatives in Turkey to manage content complaints.

Companies with more than 1 million users that refuse to designate an official representative are subjected to fines, followed by advertising bans. The next penalty would be bandwidth reductions that would make their platforms too slow to use.

Human rights and media freedom groups say the law amounts to censorship and violates the rights to privacy and access to information.

Under the law, local representatives of social media companies are responsible for answering individual requests to take down content violating privacy and personal rights within 48 hours or to provide grounds for rejection. The company would be held liable for damages if the content is not removed or blocked within 24 hours.

The law also requires social media data to be stored in Turkey, raising concerns in a country where the government has a track record of clamping down on free speech.

“We remain committed to protecting the voices and data of people in Turkey who use Twitter. We will continue to be transparent about how we handle requests from government and law enforcement,” Twitter said.

Turkey’s legal demands for content removal make up 31 percent of all requests globally, according to Twitter. The country has made some 45,800 demands and Twitter says it complied with about a third.

The government insists the legislation is needed to combat cybercrime and to protect the rights of Turkish social media users.

According to the Freedom of Expression Association, as of October 2020, more than 450,000 domains, 120,000 links and 42,000 tweets were blocked in Turkey.