Ankara: Turkey’s ban on Twitter ahead of bitterly contested local elections sparked public fury over a “digital coup” on Friday, brought international condemnation and triggered a rift between prime minister and president.

Courts blocked access to Twitter after Prime Minister Tayyip Erdogan’s defiant vow, on the campaign trail on Thursday ahead of March 30 polls, to “wipe out” the social media service, whatever the international community had to say about it.

Tech-savvy Turks, President Abdullah Gul apparently among them, quickly found ways to circumvent the ban, with the hashtag #TwitterisblockedinTurkey rapidly moving to among the top trending globally.

In the first few hours of the ban, people in Turkey sent hundreds of thousands of tweets, using technologies such as virtual private networks.

“One cannot approve of the complete closure of social media platforms,” Gul tweeted, voicing his hope that the ban would be short-lived and setting himself publicly at odds with the pugnacious prime minister.

Erdogan, who has dominated Turkish politics for 11 years, is battling a corruption scandal that has been fed by social media awash with alleged evidence of government wrongdoing. He did not mention the Twitter ban at two campaign rallies on Friday.

Turkey’s main opposition party said it would challenge the ban and file a criminal complaint against Erdogan on the grounds of violating personal freedoms. The country’s bar association filed a separate court challenge.

Telecoms watchdog BTK said Twitter had been blocked by the courts after complaints were made by citizens that it was breaching privacy. It said the social media service had ignored previous requests to remove content.

European Union Enlargement Commissioner Stefan Fuele said the move raised grave concerns and “cast doubt on Turkey’s stated commitment to European values and standards”. Turkey has been seeking membership of the EU for decades.

The government of Germany, home to the largest Turkish diaspora in Europe, said the move did not fit with its view of freedom of expression, while the British foreign office said social media had a “vital role to play in a modern democracy”.

Turkey’s financial markets were unsettled, with the lira weakening to 2.24 against the dollar, shares underperforming emerging markets peers and the benchmark 10-year bond rising to 11.24 per cent from 11.12.

San Francisco-based Twitter said it was looking into the matter but had not issued a formal statement. The company did publish a tweet addressed to Turkish users instructing them on how to continue tweeting via SMS text message.