Online freedom advocates in India are hailing a court ruling that struck down a controversial law seen as infringing free speech on the Internet. But in a country expected to have the world’s largest number of web users by 2018, some concerns about net censorship remain.

The 24-year old law student, Shreya Singhal, who spearheaded the legal battle for overturning the harsh law, said it was the arrest of two young women in 2012 for a seemingly innocuous Facebook post that prompted her to petition the Supreme Court. One woman had criticized a shutdown in Mumbai after the death of a Hindu nationalist leader Bal Thackeray, the other “liked” her post.

Like millions of others, Singhal was alarmed at their detention because she says she could have been the one to post the innocuous comment.

“It [the law] was punishing people for expressing their views on the Internet, whereas if they did it or they did it on TV or they did nit in newspapers, they would not get arrested for the same views,” she said.

Scrapping the law on Tuesday, India's Supreme Court said the Information Technology Act was vaguely worded, and did not explain what could be “inconvenient" or “grossly offensive.” The judgment said the law was liable to have a chilling effect on free speech as it strikes at the root of liberty and freedom of expression.

The law had raised alarm bells after several people were arrested in recent years for posting “objectionable content.” In the latest instance, a 16-year-old boy in Uttar Pradesh state was arrested and released on bail for posting an “insulting” remark about regional party leader, Azam Khan. Among others who were picked up under the law were a professor in Kolkata and a cartoonist in Mumbai.

The previous government, which passed the law, said it was necessary to combat abuse and defamation on the Internet, but critics said it was used by political parties to suppress dissent and criticism.

The Supreme Court ruling also made it tougher for the government to order Internet companies to remove online content.

Sunil Abraham of Bangalore-based Center for Internet and Society says local and foreign Internet companies have faced growing pressure for putting up content deemed offensive in India.

“According to Facebook's latest transparency report, takedown requests and information requests from the Indian government continue to grow, and that is worrying. But that part of the law has been read down. Now when the government sends the takedown notice, it has to be accompany the takedown notice with a court order,” said Abraham.

But free speech campaigners say concerns about online censorship have not completely gone away. The Supreme Court has upheld a law that allows the government to block websites, saying there are sufficient safeguards.

Campaigners like Sunil Abraham think otherwise. “Lack of transparency makes it impossible for anybody to tell whether the government is censoring the Internet in a proportionate manner, whether it is working to truly address the real harms that emerge from bad content online. When the court in India bans books or movies, the judgments of these courts are made available to the public."

"But if when it comes to website blocking, this transparency requirement is missing. In fact, the law has secrecy provisions, which prevents ISP’s that receive these block orders from making them available in the public domain,” said Abraham.

The young student, Singhal, who led the legal battle, said she was “overwhelmed” at the victory for online freedom.

“We are such a diverse society in India with so many diverse and different opinions. It is inherent in us, it is part of us, this democracy, this debate we have,” she said.

Her views were echoed on Twitter and Facebook by people in India, a country of 1.2 billion people where Internet access is growing rapidly.