Over the past few years, the government has aggressively pushed to compile the database, known as Aadhaar, by sending officials out to remote villages to take iris scans and fingerprints. To ensure complete enrollment, the government this year put out several notices restricting access to essential government services for those not part of the system.
The unanimous ruling by the nine-judge bench will have huge implications in a number of ongoing cases involving Aadhaar, which means base or foundation in Hindi.
It could put an end to the government's efforts of making enrollment mandatory. It also guarantees privacy for Indian citizens as an intrinsic right - removing it could have had far reaching implications beyond biometric IDs for the daily lives of Indians.
Though the full implications of the ruling will only be understood after further decisions from the court, activists say the court's message to the government is loud and clear: "This judgment says that the people of this country have rights, in case you've forgotten," said Usha Ramanathan, an independent law researcher and activist speaking over the phone.
With the right to privacy now guaranteed, opponents of Aadhaar expect favorable rulings on petitions against the governments efforts to make enrollment mandatory.
The government says that Aadhaar is crucial for better governance and can save Indian taxpayers billions of rupees by reducing welfare and tax fraud. In court, government lawyers argued that the right of all citizens to a dignified life was more important than the elitist preoccupation with privacy.
But activists say that such an extensive collection of data is prone to leaks and misuse, endangering privacy for a sixth of the world's population.
In extraordinary hearings, government lawyers dredged up old rulings to argue that Indians did not have a fundamental right to privacy. "It's a very dramatic thing when a government goes to court and says that," said Ramanathan. "It sets the government against the people."
Government rules especially targeted the poorest and most vulnerable sections of society, Ramanathan said, by restricting access to services such as free midday meals and allowances for tuberculosis patients.
Unlike social security numbers, UIDs would be accessible to various government agencies and private organizations. In recent months, government websites have mistakenly leaked thousands of UIDs.
"They want a system where you'd have to enter that number to get basic things you were entitled to, where you'd have to give your thumbprint to get your rations, your wages which you'd worked for, or pensions for the elderly," Ramanathan said.
Reetika Khera, an economist at the Indian Institute of Technology Delhi said that the government could potentially use Aadhaar as a surveillance program. "They will be able to say for example that I went on the train from Delhi to Jharkhand, where I got off, withdrew so much cash, then went to forest of Mahuadanr and conclude that she must be funding Naxalites [an insurgent rebel group] whereas I've actually gone to supervise research in the forest." The government's plan if fully implemented, she said, would treat every Indian citizen as a potential criminal. "What is the origin of biometric IDs?" she said rhetorically. "It's for criminals."
"Even during the Emergency we didn't have that," said Ramanathan, referring to a three-year period from 1975-1977 when the government ruled by decree. "During the Emergency, they took away citizens' ability to defend their right to privacy in court. Here they're trying to take away the right itself."
A spokesman from the Unique Identification Authority of India, which oversees Aadhaar said that the agency would comment only after the full judgment had been released.
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections.