MEXICO CITY (AP) — Mexico’s Supreme Court struck down on Monday a 2021 law that would have required cellphone companies to collect biometric data like fingerprints or eye scans from customers.

The court ruled the law was too invasive of personal liberty, in comparison with any positive effect it could have had. The court also ruled there were other measures that could be taken to cut down on crimes involving phones.

Cellphones in Mexico are often used in kidnappings and extortions, sometimes by inmates calling from prisons. However, such calls usually made from stolen, pre-paid or “burner” phones that the law wouldn’t have affected much.

The law, which was passed by President Andrés Manuel López Obrador’s Morena party last year, was the latest in a string of failed efforts to reign in phone crimes.

Civic groups said the measure would put customers’ personal data at risk and do little to fight crime. The Mexican government has tried cellphone registries before without success and hasn’t even been able to block cell calls from within prisons.

López Obrador said at the time that “it is just a registry to care for the population,” adding that “we will never spy on anybody.”

Critics were more concerned about the information being leaked or sold, saying it could actually help thieves, extortionists and kidnappers. They noted a similar registry attempted by a previous administration between 2008 and 2011 was abandoned after user data was leaked.

Many also feared such a huge government registry of as many as 120 million cellphone lines would be vulnerable to hackers.