Turkey blocks access to Twitter days before elections after Prime Minister Tayyip Erdogan, who is battling a corruption scandal that has been aired on the site, vowed to "wipe (it) out".

Twitter blocked in Turkey (picture: Trendsmap)

Courts blocked access to the blogging microsite hours after Prime Minister Erdogan declared "Twitter schmitter!" and said he did not care what the international community thought about the move.

But there has been a backlash on Twitter, and the hashtag #TwitterisblockedinTurkey is trending worldwide.

Everyone will see how powerful the Republic of Turkey is. Tayyip Erdogan

Mr Erdogan is facing key local elections on 30 March, but has been embroiled in allegations of corruption since the start of the year.

A corruption investigation became public on December 17 when police detained the sons of three cabinet ministers and businessmen close to the prime minister. The three ministers resigned a week later.

At an extraordinary session on Wednesday, parliament's speaker blocked opposition pleas to have a prosecutor's report with allegations against the former ministers read out.

Last week a document purporting to be the report appeared on Twitter, and included alleged transcripts of wiretapped phone conversations, pictures from physical surveillance and pictures of official documents accusing the former ministers and two of their sons of involvement with an Iranian businessman in a bribery and smuggling racket.

The authenticity of the document has not been verified.

Twitter, schmitter

Late on Thursday, Prime Minister Erdogan, who last year faced widespread protests, addressed a rally of supporters in a typically bullish tone

"Twitter, schmitter!" he said. "We will wipe out all of these.

"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."

Tayyip Erdogan at a rally on Thursday (picture: Getty)

On Friday, Turkey's courts moved to block the site, and telecoms watchdog BTK said complaints had been made by citizens that Twitter was breaching privacy. It said Twitter 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 victimization of citizens," a statement said.

Turkish Deputy Prime Minister Ali Babacan said on Friday that he expected the block to be temporary.

San Francisco-based Twitter said it was looking into the matter but had not issued a formal statement.

The company published a tweet addressed to Turkish users instructing them on how to continue tweeting via SMS text message.

Turkey's main opposition party said it will file a legal challenge against the decision. Thew EU has criticised the move, saying it was "gravely concerned".