In 2009, with little attention from abroad, the government of India launched a new identification program that has gone on to become the largest biometric database in the world. The program, known as Aadhaar, has collected the names, addresses, phone numbers—and perhaps more significantly, fingerprints, photographs, and iris scans—of more than 1 billion people. In the process, Aadhaar has taken on a role in virtually all parts of day-to-day life in India, from schools to hospitals to banks, and has opened up pathways to a kind of large-scale data collection that has never existed before.

The Indian government views Aadhaar as a key solution for a myriad number of societal challenges, but critics see it as a step toward a surveillance state. Now, the Aadhaar experiment faces a significant threat from the Indian Supreme Court—one that may prove to be existential.

In late August, the Supreme Court issued a unanimous decision that found, for the first time, a fundamental right to privacy in the Indian Constitution. The decision has been widely celebrated by Aadhaar’s opponents, who believe that the program is in conflict with the newly enshrined right. Soon, the Supreme Court will direct its attention to this very issue, and if they find that Aadhaar violates privacy rights, it will be up to lawmakers to rethink the entire program. But if the Supreme Court rules that the program is constitutional, then Aadhaar, already staggering in scope and ambition, will continue to grow.

When the Indian government first launched Aadhaar, it saw an opportunity to harness the country’s burgeoning technology sector to reduce corruption and streamline the delivery of government services. Prior to the advent of Aadhaar, the government has said it was plagued by problems managing its welfare programs, and lost millions of dollars each year as Indian residents either inserted fake names or their own names multiple times into the system in order to withdraw more than their fair share of benefits. With Aadhaar, the practice of accessing benefits became a simple matter of touching a fingerprint scanner. If the fingerprint matches the one on file, the benefit can be approved and administered. When it is working well, the process is comparable to unlocking an iPhone, and ensures that government benefits go only to the people who qualify.

Open to all Indian residents, Aadhaar was optional at first and associated with only a handful of government subsidies, including those for food and liquefied petroleum gas for cooking. It was targeted at those who needed help the most, particularly rural villagers who lacked official forms of identification, and were therefore unable to open bank accounts or access welfare programs in the past.

But over time, mission creep set in. Under the leadership of Nandan Nilekani, the cofounder of the outsourcing firm Infosys (whom Jon Stewart once welcomed as his new overlord on The Daily Show), Aadhaar was used as a way to apply data-driven improvements to a wide range of government and private-sector services. Aadhaar was soon linked to so many activities that it has now become almost impossible to live in India without enrolling. Participation in the program is a requirement, or will be soon, for filing taxes, opening bank accounts, receiving school lunch in the state of Uttar Pradesh, purchasing railway tickets online, accessing some public Wi-Fi, participating in the state of Karnataka’s universal health-care coverage, and benefiting from a wide range of welfare programs. The Indian Member of Parliament Jairam Ramesh has sarcastically described the program as “compulsorily mandatorily voluntary.”

The government authority responsible for administering Aadhaar declined to comment, but in an op-ed for The Indian Express, its CEO, Ajay Bhushan Pandey, wrote that the program has saved the government approximately $8 billion in the past two years alone (the World Bank has estimated that the figure is closer to $1 billion per year). Pandey says that the program has succeeded in improving the government’s capacity for reaching and serving people directly.

For many of the communities Aadhaar was designed to help—particularly the poor and the underserved—the technology hasn’t lived up to the sunny rhetoric, however. In a country with inconsistent internet outside of its large cities, remote towns struggle to get online to authenticate peoples’ fingerprints with the central database. Some enrollees insist that their satellite-internet access works only on cloudy days; others say it functions best when it’s sunny.

According to an analysis of government data by Reetika Khera, a professor of economics at the Indian Institute of Technology in Delhi, millions of people have missed out on government benefits because of Aadhaar. In some cases, that’s because those who are elderly or disabled are unable to walk to the distribution sites to verify their identities. Others, who do manual labor, find that their fingerprints are too weathered from years of physical exertion to scan correctly, and so are denied their food rations.

Nikhil Dey, one of the founders of the grassroots organization Mazdoor Kisan Shakti Sangathan, also studied the government’s data. He found that approximately 1 million people in the state of Rajasthan had been unfairly dropped from the government lists for food subsidies due to Aadhaar, and more than 3 million were unable to collect their designated grain allocations. In one district alone, Dey says, 1,350 out of approximately 2,900 people marked “dead” or “duplicate” were actually neither, but lost access to their pensions anyway.

Despite these implementation challenges, the scariest parts about the program for privacy advocates are its ubiquity and lax security. According to the technology engineer Anand Venkatanarayanan, when biometric information is used to access a service via Aadhaar, such as purchasing a new cell phone, the service provider receives that person’s demographic data (name, address, phone number), and the government receives the metadata—specifically, the date and time of the transaction, the form of identification used, and the company with which the transaction was carried out. That information can paint a fuzzy but intimate long-term picture of a person’s life, and raises concerns about both government surveillance and private-sector abuse.

There is already ample evidence of misuse. High-profile examples from the past several months have dominated news cycles: 210 government agencies published full names, addresses, and Aadhaar numbers of welfare beneficiaries; 120 million users’ Aadhaar information appears to have been leaked from the telecommunications company Reliance Jio (the company claimed the data was inauthentic); bank-account and Aadhaar details of more than 100 million people were disclosed through certain open-government portals; the government’s e-hospital database was hacked to access confidential Aadhaar information.

These disclosures may be most damaging for those who are already vulnerable. Apar Gupta, a lawyer on the team that challenged Aadhaar before the Supreme Court, is particularly concerned about many Dalits (previously the “untouchables” in the caste system) and migrant laborers who work as manual scavengers, entering sewers without protection to clean them by hand. It’s a dangerous occupation with a high fatality rate, and it can also bring immense social stigma. Gupta worries that Aadhaar will permanently stigmatize these individuals by allowing future employers, schools, banks, and new acquaintances to view their database information and judge them based on their socioeconomic standing. Social mobility in India could become even more difficult. So could hiding a pregnancy or a gender-reassignment surgery, or failing the eighth grade. In many of the objections raised about Aadhaar, there’s a kernel of fear that the program could turn a person’s identity into a prison.

The August 24 Supreme Court ruling seemed to address these concerns, making the case that privacy is essential for an individual to function in society. “Privacy ensures that a human being can lead a life of dignity by securing the inner recesses of the human personality from unwanted intrusion,” Justice Dhananjaya Y. Chandrachud wrote. In arriving at its decision, the Supreme Court rejected two previous decisions from the 1950s and 1960s that denied a right to privacy, and instead framed privacy as a “primordial” right that must be understood in the context of an interconnected world. The justices further emphasized the point by referencing international jurisprudence about privacy from the United States, Canada, South Africa, and the European Union.

That didn’t surprise Mishi Choudhary, the legal director of the Software Freedom Law Center, who noted that “we’re at a stage where technology is sweeping the planet in almost the same way. A lot of countries are looking to each other for guidance on how to adapt their jurisprudence to suit the current world.”

Over the last few years, Russia, Tunisia, Morocco, and Algeria have all expressed interest in the Aadhaar program, and according to reports, representatives from Tanzania, Afghanistan, and Bangladesh recently visited India to learn more about implementing an Aadhaar system of their own. As the Supreme Court once again prepares for hearings about Aadhaar, the world will be paying close attention.