Where do you draw the line on free speech when extremists use social media to spread rumors that send thousands of people fleeing their homes in panic?
And what about when political activists impersonate the prime minister on social media to put out offensive material to ridicule him?
Those are the questions India has faced in recent weeks as the world's largest democracy finds itself wrestling with what to do with Twitter -- the world's loudest public megaphone.
The most urgent issue since mid-July is how to stop extremists in two rival communities stoking a full-scale sectarian conflict. The extremists have been using Twitter to spread rumors that each side is attacking the other across India and supporting the charges with falsified pictures of purported victims.
The two communities are both native to the northeastern state of Assam but have diasporas in cities across the country after a bloody clash in 1993. In that clash, the local Bodo tribe evicted local Muslim Indians from disputed land before thousands of members of both groups sought refuge or migrated to other parts of India, where they live uneasily together.
Then, in July, violence erupted again in Assam between the two groups, killing 80 people and displacing 300,000 more. The rumors on Twitter quickly followed, causing tens of thousands of people elsewhere in India to flee because they were afraid the communal violence would spread to where they live.
You've Got Mail!
With the rumors and fear growing daily, the Indian government demanded in a letter last week that Twitter block the accounts of users fanning the violence. The government on August 17 also banned SMS text messages directed to more than five recipients and blocked some 250 websites with inflammatory content.
But, in a what later looked like bad timing, Prime Minister Manmohan Singh simultaneously moved to block access to certain Twitter accounts that were spoofing him. Those users, unrelated to the extremists, were impersonating the Twitter account of the Office of the Prime Minister to ridicule Singh and his programs.
Twitter CEO Dick Costolo at a June press conference
As Twitter, which has 16 million subscribers in India, did not immediately respond to the prime minister's request, New Delhi threatened to shut down the service entirely. The result was people across India began debating one of the toughest questions democracies face: the borders between censorship and free speech.
Parth Shah, head of the Delhi-based Center for Civil Society, says most people backed the government's demand to shut down the sites spreading ethnic hatred.
"The stance is that this happened so fast and that it happened because of the reach of social media, that people from Assam living across various parts of India immediately came to know that there is a threat to their life and property," Shah says.
Nonetheless, he maintains that, if most people thought there had to be some censorship in the case of hate-mongering, they rejected the idea of protecting the prime minister himself from satirical impersonations.
"Freedom of speech has a very strong appeal to the people of India and we know how important that is to maintain our political and economic freedoms," Shah says.
The standoff between New Delhi and Twitter eased after the microblog giant agreed on August 23 to remove six hate-content sites. But Twitter stopped short of promising to do the same for sites ridiculing the prime minister, agreeing only to address the government's concerns.
The company also said it was not able to respond to the Indian government's written request earlier because it had not followed "proper procedure." No more details were immediately available.
Kirsty Hughes, who follows social media at the London-based Index on Censorship
, sees the India-Twitter dispute as part of an ongoing battle between the Indian government over free speech on the Internet.
"There are certainly a number of court cases pending or ongoing between the Indian government and [social media] companies like Facebook and Google and the fact that there are court cases in India shows that these companies don't simply always roll over in the face of governments saying take down this or take down that," Hughes says. "They are actually trying to defend some of their space and therefore some of their users' space by standing up to governments."
That is a very different situation to authoritarian countries. There, social media are often forced to choose between bowing to government restraints or ceasing to do business in the country.
Twitter executives have famously described Twitter as the free-speech wing of the free-speech party. But in January this year, the company unveiled plans to permit, on a country-by-country basis, censoring tweets that might break local laws. To make clear it is not doing so happily, Twitter said it will also publicly post all removal requests it gets from governments so users know where they come from.
Google, too, has had to make concessions to do business in authoritarian environments. In China, the search-engine giant operated worked until 2010 under censorship policies enforced by government filters that block access to websites containing officially censored words. Since then, Google has moved its servers to Hong Kong, where they are uncensored, and directs its mainland Chinese users there.
How India, the world second most populous country, ultimately decides what constitutes free speech on social media remains to be seen.
But, as the latest Twitter case shows, the process is likely to continue being done on a difficult, sometimes messy, case-by-case basis.