The law had been 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 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 hate speech will be dealt with under other laws that govern the Internet.
The contention by most of the petitioners was that Section 66A is vague and allows the police arbitrary interpretation and misuse of the law. The previous government, headed by the Congress, said that the law was necessary to combat abuse and defamation on the internet. The new BJP government also defended the law in court.
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.
Section 66A reads: "Any person who sends by any means of a computer resource any information that is grossly offensive or has a menacing character; or any information which he knows to be false, but for the purpose of causing annoyance, inconvenience, danger, obstruction, insult shall be punishable with imprisonment for a term which may extend to three years and with fine."