* Turkey asked Twitter to reveal user identities -official
* Move comes after weeks of anti-government protests
* Turkey shut down YouTube for over two years in 2008
By Ozge Ozbilgin and Jonathon Burch
ANKARA, June 26 (Reuters) - Turkey said on Wednesday it had asked Twitter to set up a representative office inside the country, which could give it a tighter rein over the microblogging site it has accused of helping stir weeks of anti-government protests.
While mainstream Turkish media largely ignored the protests during the early days of the unrest, social networking sites such as Twitter and Facebook emerged as the main outlets for Turks opposed to the government.
Transport and Communications Minister Binali Yildirim told reporters on Wednesday that without a corporate presence in the country, the Turkish government could not quickly reach Twitter officials with orders to take down content or with requests for user data.
"When information is requested, we want to see someone in Turkey who can provide this ... there needs to be an interlocutor we can put our grievance to and who can correct an error if there is one," he said.
"We have told all social media that ... if you operate in Turkey you must comply with Turkish law," Yildirim said.
Twitter declined to respond to the government request on Wednesday, but a person familiar with the company's thinking said it had no current plans to open an office in that country.
Turkey successfully pressured Google Inc into opening an office there last October after blocking YouTube, a Google subsidiary, from Turkish Internet users for two years.
While Ankara had no problems with Facebook, which had been working with Turkish authorities for a while and had representatives inside Turkey, Yildirim said it had not seen a "positive approach" from Twitter after Turkey issued the "necessary warnings" to the site.
"Twitter will probably comply, too. Otherwise this is a situation that cannot be sustained," he said, without elaborating, but he stressed the aim was not to limit social media.
An official at the ministry, who asked not to be named, said the government had asked Twitter to reveal the identities of users who posted messages deemed insulting to the government or prime minister, or that flouted people's personal rights.
It was not immediately clear whether Twitter had responded.
Facebook said in a statement that it had not provided user data to Turkish authorities in response to government requests over the protests and said it was concerned about proposals Internet companies may have to provide data more frequently.
In the midst of some of the country's worst political upheaval in years, Turkish Prime Minister Tayyip Erdogan has described sites like Twitter as a "scourge," although senior members of his party are regular users. He has said such websites were used to spread lies about the government with the aim of terrorising society.
Police detained several dozen people suspected of inciting unrest on social media during the protests, according to local reports.
Speaking at the Brookings Institution in Washington, D. C., Twitter's Chief Executive Dick Costolo said on Wednesday that he had been observing the developments in Turkey, but he emphasized that Twitter had played a hands-off role in the political debate.
"We don't say, 'Well, if you believe this, you can't use our platform for that,'" Costolo said. "You can use our platform to say what you believe, and that's what the people of Turkey ... are using the platform for. The platform itself doesn't have any perspective on these things."
Turkey's interior minister had previously said the government was working on new regulations that would target so-called "provocateurs" on social media but there have been few details on what the laws would entail.
One source with knowledge of the matter said the justice ministry had proposed a regulation whereby any Turk wishing to open a Twitter account would have to enter their national identification number, but this had been rejected by the transport ministry as being technically unfeasible.
Last year, Twitter introduced a feature called "Country Withheld Content" that allows it to narrowly censor tweets considered illegal in a specific country, and it caused some concern among users.
Twitter implemented the feature for the first time in October in response to a request by German authorities, blocking messages in Germany by a right-wing group banned by police.
Turkey said last year that it had won a long-running battle to persuade Google-owned YouTube to operate under a Turkish Internet domain, giving Ankara more control over the video-sharing website and requiring the company to pay Turkish taxes. In October, Google opened an office in Istanbul.
Turkey banned the popular website for more than two years in 2008 after users posted videos the government deemed insulting to the republic's founder, Mustafa Kemal Ataturk.
Rights groups have long pressed Turkey to reform strict Internet laws and analysts have criticised the ease with which citizens and politicians can apply to have a website banned.
Turkey cites offences including child pornography and insulting Ataturk to justify blocking websites.
Turkish users have increasingly turned to encryption software to thwart any ramp up in censorship of the Internet.