The Supreme Court has scrapped a contentious law that was seen as a major infringement of the freedom of speech online because it allowed the arrest of a person for posting "offensive" content. Section 66(A) of the Information Technology Act, "is unconstitutional and we have no hesitation in striking it down," said Justice RF Nariman, reading out the judgment.
"The public's right to know is directly affected by Section 66(A)," he added.
Information Technology Minister Ravi Shankar Prasad later said his government would come up with an amended law if needed, after "widest consultation". But he also added, "Those who are in power must be liberal, India is a free country."
The court had been asked to examine the legality of Section 66(A), which makes sending information of "grossly offensive or menacing character" punishable by up to three years in jail.
The law was challenged first by a law student named Shreya Singhal after two young women were arrested in 2012 for posting comments critical of the total shutdown in Mumbai after the death of Bal Thackeray, the Shiv Sena chief. The group that challenged the law in the Supreme Court later expanded to include the NGO Common Cause and Bangladeshi writer Taslima Nasreen.
"Nobody should have fear of putting up something because of the fear of going to prison," said Ms Singhal, adding that after today's verdict, hate speech will be dealt with under other laws that govern the Internet.
Critics of the law said it was misused by political parties to target their opponents and dissidence. A professor in West Bengal was arrested in 2012 for posting a cartoon of Chief Minister Mamata Banerjee, for example.