India's top court ruled Thursday that privacy is a fundamental right of every citizen, in a landmark judgment that could affect the country's mammoth identity card system.

The verdict was in response to many petitions filed in courts questioning the validity of assigning a biometric identity card to every individual. The government has made the identity card mandatory for all citizens to receive welfare benefits, but human rights groups raised concerns about the risk of personal data being misused.

"This is a very progressive judgment that endorses and protects the fundamental rights of the people," said Soli Sorabjee, a leading lawyer and former attorney general of India.

The ruling overturns two earlier decisions by smaller benches of the Supreme Court, which said privacy was not a fundamental right. On Thursday, a nine-judge bench of the court unanimously ruled that the right to privacy is intrinsic to the fundamental rights guaranteed by the constitution.

The decision is viewed as a setback to the government's efforts to make the ID card compulsory. The government will now have to convince the court that forcing citizens to give their fingerprints and a scan of their iris is not a violation of privacy.

The opposition Congress party welcomed the decision, saying the verdict is a victory for individual rights and human dignity.

The verdict "strikes a blow on the unbridled encroachment and surveillance by the state and its agencies on the life" of each citizen, party president Sonia Gandhi said in a statement.

Rights activists hailed the verdict as a win for individual freedom.

"The right to privacy that the court has defended today is essential to ensure individual autonomy, and is closely linked to the exercise of several other rights, from what people say online to whom they love and what they eat," said Asmita Basu of Amnesty International India.