San Francisco: When a Brazilian state prosecutor last year set out to silence anonymous Twitter messages that were revealing the location of drunk-driving checkpoints, he served the social media company's just-opened Sao Paolo office with a lawsuit.
Sharing sightings of police checkpoints does not violate any rules set by Twitter Inc, which has far fewer restrictions on content than social media rivals such as Facebook Inc. Nor would such Tweets be a crime in the United States. Twitter has traditionally resisted efforts to obtain the identity of users whose words might be regarded as a crime.
But in Brazil, Twitter quickly handed over the Internet protocol addresses of three accounts as a demonstration of its "good faith, respect and will to cooperate with the Brazilian judicial power," the company's lawyers said in a legal filing last October.
Even that wasn't enough: the lawsuit, which demands that the company bar any such accounts in the future, is ongoing. The situation in Brazil is a microcosm of the public policy and business challenges facing Twitter as it seeks to translate global popularity into profits.
Since its inception, the 140-character messaging service's simplicity and mobile-friendly nature - it can be used by any cellphone with a text-messaging function - has helped speed its global adoption as a source of real-time information. Unlike many social media services, it can be used anonymously.
The company's laissez-faire approach to monitoring content, together with an aggressive posture in challenging government censorship requests and demands for customer information, have made it the darling of civil liberties advocates and political protesters from New York's Zuccotti Park to Cairo's Tahrir Square.
But now, as it prepares to become a public company with a valuation expected to exceed $10 billion, Twitter must figure out how to make money outside the US International customers make up more than 75 percent of Twitter users, but only 25 percent of sales come from overseas.
That means opening offices and employing people on the ground: there are now seven overseas offices and counting. And that, in turn, means complying with local laws - even when they conflict with the company's oft-stated positioning as "the free-speech wing of the free-speech party."
These conflicts, paradoxically, arise not so much in countries with repressive governments - the service is banned outright in China, for instance - but rather in countries with Western-style democracies, including Brazil, Germany, France, Britain and India.
"There are a bunch of countries that you can't treat like China because they have democratic systems and they abide by the rule of law, but they have speech restrictions that we would find objectionable," said Andrew McLaughlin, a former director of global public policy at Google Inc and White House technology official who is now chief executive of news website Digg.
"Those are the issues where the rubber hits the road on free speech."
In Twitter's initial public offering prospectus, which was made public last week, there was only an oblique mention of protecting speech. The company said its corporate mission was to facilitate the dissemination of "ideas and information instantly without barriers," and that "our business and revenue will always follow that mission in ways that improve - and do not detract from - a free and global conversation."
Alex Macgillivray, the former general counsel who coined the company's free speech slogan and was widely regarded as a staunch civil libertarian, left the company in September.
Twitter declined to comment about potential conflicts between its business goals and its free-speech advocacy in general, or any specific cases.
There's certainly no shortage of political chatter on Twitter, and world leaders ranging from Iranian President Hassan Rouhani to Pope Francis have taken to the service as a means of communicating directly with constituents.
Activists say they haven't seen Twitter backing away from its free-speech policies yet - but they're wary. "Twitter has always been an ally," said Hisham Almiraat, a Moroccan blogger who manages the anti-censorship website Global Voices Advocacy.
"As soon as Twitter becomes public, it needs to be accountable to its shareholders, and its strategy becomes more short-term. If Twitter, for reasons of greed, or because they are politically compelled, decides to change that core philosophy, then I'll worry."
Opportunity in Brazil
A booming, social media-loving country of more than 80 million Internet users, Brazil perennially ranks among Twitter's most active markets. When the company set up operations in Sao Paolo in late 2012, the company's top sales executive, Adam Bain, described the opportunity in the country as "amazing from a business perspective."
As in many Latin American nations, the service is used by everyone from the president on down. And with Twitter proving to be a powerful companion medium for sports and other forms of televised entertainment, Brazil's role as host of the 2014 World Cup and 2016 Olympic Games make it an especially attractive target.
Yet the broad adoption of Twitter has not been accompanied by broad tolerance of the free-wheeling conversations that characterize social media in general and Twitter in particular.
Brazilian government bodies regularly file more requests for user information or content removal than any country other than the US, according to transparency reports published periodically by companies including Twitter and Google.
Luis Fernando Canedo, the prosecutor in Brazil, described his case over the driving checkpoints as a landmark for the country - and also for Twitter, which had never before been sued by a government.
"Social networks are a relatively new reality and so is their impact," Canedo told Reuters. "There are future situations today we can't even imagine and in which the State will have to position itself in front of certain illegal, harmful practices being carried out over the Internet."
His case has not exactly gone smoothly. Even after obtaining Internet addresses from Twitter, the prosecutors misidentified the suspects behind the driving checkpoint Tweets.
They then dropped the case against the individuals, but still want Twitter to bar any such accounts in the future.
Hate speech in Europe
Twitter has long tried to hew to the position that users - not the company - are responsible for the content on the service. But last year it implemented a means of filtering Tweets by country, so that if it were forced to censor messages in one place it would still be able to show them in others.
That capability was used for the first time last October, when Twitter yielded to a request from German police to filter a neo-Nazi group's Twitter account so that users in Germany could not see it.
Earlier this year, just as Twitter's head of international strategy, Katie Jacobs Stanton, relocated to France to open Twitter's Paris office, Twitter's lawyers were fighting an order by a French court to reveal the email and IP addresses of users who had sent a spate of anti-Semitic tweets, which are prohibited under the country's hate-speech laws.
When Twitter exhausted its appeals in July, the company turned over the information.