NEW DELHI — The Supreme Court in India struck down a section of its country’s information technology act Tuesday that had made it illegal for anyone to spread ‘‘offensive messages’’ on electronic devices and resulted in arrests over posts on Facebook and other social media.
Supreme Court Judge Rohinton Fali Nariman wrote in the ruling that the section of the law, known as 66A, was unconstitutional, saying the vaguely worded legislation had wrongly swept up innocent people and had a ‘‘chilling’’ effect on free speech in the world’s most populous democracy.
‘‘Section 66A is cast so widely that virtually any opinion on any subject would be covered by it,’’ the judge wrote. ‘‘If it is to withstand the test of constitutionality, the chilling effect on free speech would be total.’’
India had first passed its Information Technology Act in 2000, but stricter provisions were added in 2008 and ratified in 2009 that gave police sweeping authority to arrest citizens for their personal posts on social media, a crime punishable for up to three years in jail and a fine.
Sunil Abraham, the executive director of the Center for Internet and Society in Bangalore, said that the section was originally intended to protect citizens from electronic spam, but it did not turn out that way.
‘‘Politicians who didn’t like what people were saying about them used it to crack down on online criticism,’’ he said.
In the end, there were more than 20 high-profile arrests, including a professor who posted an unflattering cartoon of a state political leader and an artist who drew a set of cartoons lampooning the government and Parliament.
The most well-known was the case of two young women arrested in the western town of Palghar after one of them posted a comment on Facebook that argued that the city of Mumbai should not have been shut down for the funeral of a famous conservative leader. A friend, who merely ‘‘liked’’ the post, was also arrested. After much outcry, the two were released on bail and the charges eventually dropped.
The case of the ‘‘Palghar Girls’’ inspired a young law student, Shreya Singhal, to take on the government’s law. Singhal became the chief petitioner for the case, along with other free speech advocates and an Indian information technology firm.
‘‘It’s a big victory,’’ Singhal said after the ruling. ‘‘The Internet is so far-reaching and so many people use it now, it’s very important for us to protect this right.’’
Singhal and other petitioners had also argued that another section of India’s technology act that allowed the government to block websites containing questionable material were also unconstitutional, but the court disagreed, saying there was a sufficient review process in place to avoid misuse.
Free speech in India is enshrined in the country’s constitution but has its limits. Books and movies are often banned or censored out of consideration for religious and minority groups.
In 2014, a conservative Hindu group persuaded Penguin India to withdraw a book on Hinduism by Wendy Doniger, a professor of religion at the University of Chicago, from the Indian market. And more recently, the government of India blocked a planned television debut of a documentary film on a 2012 gang rape case, ‘‘India’s Daughter.’’
Along with India, other nations have sharply increased monitoring and crackdowns on perceived insulting Web posts in recent years.
Across the Gulf Arab states, dozens of activists have been arrested for social media posts considered insulting to the country’s rulers or tarnishing the national image.