* Angry reaction at home and abroad as Twitter blocked
* On campaign trail, Erdogan vows to "wipe out" Twitter
* President criticises complete closure of platform
* Regulator says ban follows court order
* Twitter says stands with users in Turkey (Recasts, adds Twitter comment)
By Nick Tattersall and Orhan Coskun
ANKARA, March 21 (Reuters) - Turkey's ban on Twitter ahead of bitterly contested elections brought a furious reaction at home and abroad on Friday, with users of the social networking service denouncing the move as a "digital coup" and the president expressing his disapproval.
A court blocked access to Twitter after Prime Minister Tayyip Erdogan's defiant vow, on the campaign trail on Thursday ahead of March 30 local elections, to "wipe out" the social media service, whatever the international community had to say about it.
Industry Minister Fikri Isik said talks with Twitter were taking place and the ban would be lifted if the San Francisco-based firm appointed a representative in Turkey and agreed to block specific content when requested by Turkish courts.
"We stand with our users in Turkey who rely on Twitter as a vital communications platform. We hope to have full access returned soon," the company said in a tweet.
A company spokesman declined to say whether it would appoint someone in Turkey but said it was moving forward in talks with the government.
Tech-savvy Turks - President Abdullah Gul apparently among them - quickly found ways to circumvent the ban, with the hashtag #TwitterisblockedinTurkey among the top trending globally on Friday.
"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 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.
Twitter users called the move a "digital coup", some comparing Turkey to Iran and North Korea, where social media platforms are tightly controlled. There were also calls for protests.
"Waking up to no Twitter in Turkey feels like waking up to a coup. The modern equivalent of occupying the radio stations," U.S. author and journalist Andrew Finkel, who has reported from Turkey for more than 20 years, said on his Twitter account.
Erdogan's ruling AK Party has already tightened Internet controls, handed government more influence over the courts and reassigned thousands of police and hundreds of prosecutors and judges as it fights the corruption scandal, which the prime minister has cast as a plot by political enemies to oust him.
Gul, seen as a more conciliatory figure than Erdogan, has been hesitant to openly criticise the prime minister in the run-up to the election, despite the scandal and the latter's increasing claims of a conspiracy against his government.
The two co-founded the Islamist-rooted AK Party and Gul is seen as a potential successor to Erdogan should the latter run for the presidency in an August vote. His critics say his own ambitions have made him too cautious about challenging Erdogan, by far the most powerful figure in the ruling party.
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.
"Because there was no other choice, access to Twitter was blocked in line with court decisions to avoid the possible future victimisation of citizens," it said.
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.
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 percent from 11.12.
Twitter published a tweet to Turkish users instructing them on how to continue tweeting via SMS text message.
Erdogan was scathing about the service on Thursday. "We will wipe out all of these," he said. "The international community can say this, can say that. I don't care at all. Everyone will see how powerful the Republic of Turkey is."
Deputy Prime Minister Ali Babacan said he expected the block to be temporary while Finance Minister Mehmet Simsek told state broadcaster TRT Haber the closure "does not derive from a prohibitive mentality" and was nothing other than the application of a court ruling. (Additional reporting by Seda Sezer, Daren Butler and Humeyra Pamuk in Istanbul, Gulsen Solaker and Jonny Hogg in Ankara, Guy Faulconbridge in London, Noah Barkin in Berlin, Edwin Chan, Gerry Shih and Alexei Oreskovic in San Francisco; Editing by Janet Lawrence)