WhatsApp had announced it would share users' details with Facebook last month.
Here are the top 10 developments in this story:
In order "to protect interest of users", the court directed WhatsApp to delete information and data of people who opt out of the service before September 25 and not to share it with social networking site Facebook or its group companies.
In the case of users who choose to continue using the app, their information, data and details existing up to September 25, from when the new policy comes into effect, shall not be shared with the social networking site, the court told WhatsApp.
The court also asked the telecom regulator TRAI to examine the feasibility of bringing internet messaging applications like WhatsApp under the statutory regulatory framework.
Senior advocate Pratibha M Singh, who had argued on behalf of the two students, called the judgement 'path-breaking'. "It is a major dent on their policy, definitely. WhatsApp will have to make changes," she told Press Trust of India.
The court said it was issuing the directions as WhatsApp, while launching its app initially, had provided complete security and protection of privacy, and also because of an on-going Supreme Court case over an individual's right to privacy.
WhatsApp had told the court that once a user deletes an account, information and data on that person is no longer retained on its servers. It also clarified that only a user's name and phone number are shared and not the content of the messages which are encrypted.
The petitioners allege that while WhatsApp claims in an affidavit that it does not retain messages, the company has contradicted itself by saying it can keep user messages for a longer period of time to improve performance.
WhatsApp began operations in 2010. It was acquired Facebook in 2014 in a 19 billion dollar deal.