The Supreme Court said the 2009 amendment to India’s Information Technology Act known as section 66A was unconstitutional and a restriction on freedom of speech.
“Section 66A is unconstitutional and we have no hesitation in striking it down,” said Justice R F Nariman, reading out the judgement.
“The public’s right to know is directly affected by section 66A.”
The Supreme Court had been asked to examine the legality of section 66A, which makes sending information of “grossly offensive or menacing character” punishable by up to three years in jail.
In 2012 two young women were arrested under the act over a Facebook post criticising the shutdown of financial hub Mumbai after the death of a local hardline politician.
The charges were later quashed by a Mumbai court.
But the case, which followed several arrests across the country for political cartoons or comments made online, sparked outrage and fierce debate about online censorship in India.
The government later issued guidelines on enforcing the law.
But in its judgement, the court said that the amendment could not be “saved by the assurances of the government that it will not be misused”. -AFP