The Supreme Court has finally truck down controversial legislation, under which those who posted “offensive” comments on social media could be jailed. The move followed a 2-year campaign by free speech activists. The court decided that an amendment to India’s Information Technology Act was unconstitutional and called it a restriction on freedom of speech.

The legislation in question, which received presidential assent 6 years ago, declared posting offensive comments punishable by up to 3 years of prison time. According to campaigners, police repeatedly misused this amendment. For example, a few weeks ago a teenager was arrested for a Facebook post allegedly “carrying derogatory language against a community” wrongly attributed to a powerful local politician.

This was not the only case, as you can understand. For instance, a university professor was jailed for posting a cartoon about the minister of the state, 2 young women were arrested for criticizing the shutdown of Mumbai after the death of a local hardline politician, one of them being arrested for a simple “like”. Although a court later quashed those charges, they sparked fierce debate about Internet censorship in the country.

Now Indian politicians welcomed the recent court ruling, though some believe that the law in question should remain to prevent “misuse” of the worldwide web. The communications and law minister of India announced that the government had earlier believed that firm guidelines were required to ensure the legislation didn’t contradict with freedom of expression as guaranteed by the constitution. As for government lawyers, they had to admit that the legislation had been misused, but pointed out that they needed some means to regulate offensive content posted online.