Kuwait’s controversial mandatory DNA collection law has been overturned by the country’s Constitutional Court in a Thursday ruling.

“Forcing civilians who have not been accused of violating the law to take and save their DNA in a database violates basic human rights and privacy,” the court ruled, according to a translation provided to Ars.

“The law violates Articles 30 and 31 of Kuwait’s constitution as well as Article 17 of the International Convention of Civil and Political Rights , which Kuwait has agreed to.”

Those portions of the Kuwaiti constitution deal with “personal liberty.”

As Ars reported last year, the law had mandated DNA collection from all citizens and resident foreigners, a total of about 3.5 million people, plus all visitors to the tiny Gulf state. The law was quickly passed by the Kuwaiti Parliament after a July 2015 terrorist attack in the capital left nearly 30 people dead. By having a large database of everyone’s DNA, presumably it would be easier to identify victims of terrorism or perhaps even criminal suspects.

Adel Abdulhadi, a Kuwaiti lawyer who spearheaded the legal challenge last year to the law, applauded the move.

“Justice was served, and I am proud to have taken part of this honorable challenge not just to maintain stability of human rights and privacy, but also to assist in standing against using this highly sensitive science and technology in an improper manner internationally,” he e-mailed Ars on Thursday morning.

In the United States, it's perfectly legal for law enforcement to perform DNA collection on arrested individuals.