A girl surfs a Facebook page at an Internet cafe in Gauhati, India, Dec. 6, 2011.
A girl surfs a Facebook page at an Internet cafe in Gauhati, India, Dec. 6, 2011.

NEW DELHI - The Indian government backtracked Tuesday on a proposed requirement for all messages sent on social media and mobile chatting apps to be saved for several months as a way of defeating encryption technology.

The proposed law stipulated that all social media users would have to save plain-text versions of messages for 90 days. Services such as WhatsApp, Facebook, Twitter, Viber and Google Chat encrypt messages as they are sent between users.

There was widespread outrage online over the threat to privacy and the possibility of prosecution for those who refused to save their communications.

The uproar comes just days before India's Prime Minister Narendra Modi heads to Silicon Valley where he is to meet technology entrepreneurs to persuade them to invest in India. Modi is scheduled to meet the chief executives of Microsoft and Google as well as visit the Facebook campus where he will address a townhall-style meeting with the social media giant's cofounder Mark Zuckerberg.

India has more than 350 million Internet users and that number is expected to grow rapidly as more people use smartphones to go online.

Communications and Information Technology Minister Ravi Shankar Prasad said the government was withdrawing its draft encryption policy. The amendment to an existing telecoms law would be redrafted and would not affect most people.

"I wish to make it very clear that it is just a draft and not the view of the government," Prasad told a press conference.

The proposed law would also have required foreign companies using encryption to submit their software to scrutiny by Indian government agencies.

Prasad said the government respects the right to freedom of expression but is also trying to enhance security as the volume of Internet communications and other online activity by individuals, government agencies and companies increases enormously.

The government has set an Oct. 16 deadline for public feedback on the law.

Modi has been a keen user of social media such as Twitter and Facebook to conduct diplomacy, congratulate athletes and explain his political agenda to the public.