In a tweet, Turkey's president on Friday hit out at the government ban of Twitter, as opposition leaders vowed to mount a legal challenge to the measure that came just days ahead of crucial polls. The popular micro-blogging site, one of several that has been used to publish allegations of corruption in Prime Minister Recep Tayyip Erdogan's inner circle, went dark in Turkey late Thursday, just hours after the embattled leader threatened to "wipe out" the social network. The move sparked outrage from the opposition and the European Union -- which Ankara has long sought to join -- as well as Erdogan's own administration. Turkish President Abdullah Gul, a frequent user of social media, led the chorus of calls against the move. "A complete ban on social media platforms cannot be approved," he said, adding that it is not "technically possible to totally block access to platforms used all over the world". Opposition lawmaker Aykan Erdemir said his party would take "legal action" against the ban, warning that the move would put Turkey into a league of undemocratic countries like China. "This is an unbelievable violation of fundamental rights and freedoms," Erdemir, of the Republican People's Party (CHP), told AFP. European leaders said the move violated citizen's rights to freedom of speech and could threaten Turkey's bid to enter the 28-nation bloc. Ankara is already the world's top jailer of journalists, according to press freedom lobby group The Committee to Protect Journalists. "The ban on the social platform Twitter.com in Turkey raises grave concerns and casts doubt on Turkey's stated commitment to European values and standards," EU Enlargement Commissioner Stefan Fule said in a statement. "Social media has a vital role to play in a modern democracy. As a candidate country, EU expects Turkey to promote the values of freedom of expression, democracy and the rule of law," tweeted Britain's embassy in Turkey. A spokesman for German Chancellor Angela Merkel tweeted that "in a free society it is up to citizens to decide how to communicate, not the state". The ban on Twitter is the latest in a series of moves by Erdogan's government to tighten its control of the Internet that have included the banning of thousands of websites. YouTube was banned for two years up to 2010 because of material deemed insulting to the country's revered founder, Mustafa Kemal Ataturk. Early this month, Erdogan warned that his government could ban Youtube and Facebook after local polls, triggering concerns from its ally the United States. - 'We will wipe out Twitter' - "These measures are devastating to free expression and freedom of the media and they curbs citizens' right to freely express themselves," OSCE Representative on Freedom of the Media Dunja Mijatovic said in a statement on Friday. The restriction of access to Twitter came after Erdogan told a rally drumming up support for March 30 local elections that he would eradicate Twitter access in the country. "We will wipe out Twitter. I don't care what the international community says," he told a crowd of his party's supporters in the western Bursa province Thursday. His office later said that authorities would "technically block access to Twitter" because the service had ignored various Turkish court orders to remove some links deemed illegal. Twitter responded to the ban by saying on its official @policy feed that Turks could get around the block by tweeting through mobile telephone text services. - Graft allegations tweeted - Users exchanged simple techniques for getting around the ban, including how to make it appear like someone is accessing the Internet from a different country and the number of tweets coming from inside Turkey had not fallen, the Hurryiet daily reported. Hastags #TwitterisblockedinTurkey and #TurkeyBlockedTwitter quickly started trending on the network. Erdogan, Turkey's charismatic and increasingly autocratic leader since 2003, has come under mounting pressure since audio recordings spread across social media that appeared to put him at the heart of a major corruption scandal. They included an apparent discussion between Erdogan and his son about hiding money, and others in which he appears to be interfering in business deals, court cases and media coverage. Some of the most damaging information has come from a Twitter account under the name Haramzadeler ("Sons of Thieves"), which has published documents and police wiretaps allegedly linked to the investigation. Erdogan has dismissed most of the recordings as "vile" fakes concocted by his rivals The prime minister is openly suspicious of the Internet, and last year called Twitter a "menace" after it was used by protesters to mass anti-government demonstrations. Erdogan's government has been engulfed by a vast corruption probe launched in December, which has seen dozens of people rounded up, including close business and political allies of the prime minister. The Turkish strongman has accused associates of a former staunch ally -- US-exiled cleric Fethullah Gulen -- of being behind the graft probe that claimed the scalps of four ministers. Gulen has denied any involvement.