India's top court has reaffirmed people's right to free speech in cyberspace by striking down a provision that had called for imprisoning people who sent "offensive" messages by computer or mobile phone.

The provision, known as Section 66A of the 2008 Information Technology Act, says sending such messages is a crime punishable by up to three years in prison.

The Supreme Court said in a ruling Tuesday that the provision violates people's free speech and their right to know and share information, and is "clearly vague" in not clarifying what should be construed as offensive.