Over one billion Indians have already signed up for Aadhaar, set up to be a secure form of digital identification for citizens to be used for access to government services and welfare schemes.

The 12-digit Unique Identification Number was declared compulsory for services including bank accounts, PAN cards, cellphone services, passport and even driving licenses.

It was made the overarching proof of identity and residence, above all other identity proofs.

But as it was rolled out, there were concerns about privacy, data security and recourse for citizens in the face of data leaks.

Petitioners said Aadhaar -- built on a mammoth biometric database comprising fingerprints and iris scans -- cannot be made mandatory.

The huge Aadhaar database can easily be compromised, petitioners had said, pointing out that a law that "impacts human life can't remain a law".

The Centre had defended Aadhaar on several grounds - the biggest being that it ensured proper distribution of benefits to millions and prevented siphoning of funds. Aadhaar data is safe and cannot be breached, insisted the government and the Aadhaar authority UIDAI.

Prime Minister Narendra Modi had also defended the system, saying Aadhaar represented the march of technology and those opposing it "have lagged behind in technology -- either they cannot understand or are purposely spreading lies".

Hearings in the case started in January and went on for 38 days - making it the second longest after the Keshavananda Bharti case, which questioned if parliament's power to amend the Constitution was unlimited, to the extent of taking away all fundamental rights. The hearing went on for five months in 1973.