The Trump administration could soon begin collecting DNA samples from hundreds of thousands of migrants apprehended along the U.S.-Mexico border, including legal asylum seekers, under a new rule that stands to dramatically expand a federal database of individual genetic information used by law enforcement.

The new rule, which will likely draw legal challenges, modifies the terms of the 2005 DNA Fingerprints Act, which broadly authorized the federal government to collect DNA samples from people arrested and charged with federal crimes. The DNA profiles collected by law enforcement agencies under that law are funneled into the FBI’s Combined DNA Index System (CODIS), a repository of the genetic information of criminal suspects, which law enforcement can search for matches to DNA evidence obtained at crime scenes.

The Department of Homeland Security, which oversees U.S. immigration authorities, was previously exempted from having to collect DNA from detained immigrants, many of whom are apprehended after crossing the U.S.-Mexico border and have no previous criminal history.

The Trump administration, which proposed the rule last October, argues that the measure will expand the identifying tools available to law enforcement officers to help them better identify criminals now — and later.

“Regardless of whether an immigration detainee, at the time he is booked, has previously committed a crime in the United States, the benefits of DNA-sample collection include the creation of a permanent DNA record that may match to DNA evidence from a later crime, if the detainee remains in or later reenters the United States and commits such a crime,” the Justice Department wrote in the rule published Friday.

Civil rights advocates warned that forced collection of DNA information from non-criminals would foretell an Orwellian future, “and would constitute a big step toward a mass database for full population surveillance,” in the words of public comments submitted on behalf of the American Civil Liberties Union last fall.

“With this vast amount of sensitive information in the governments hands, the potential for abuse is too great,” the ACLU wrote in public comments submitted to the Federal Register in the weeks after the administration proposed the rule in October.

Human rights groups and other critics have charged that the rule will further stigmatize immigrants; divert a hefty sum of tax dollars toward a logistical effort of questionable value; and pave the way to other types of government abuse, including the misuse of genetic data for other purposes than solving crime, as well as wrongful convictions deriving from mistakes in DNA collection and analysis.

Physicians for Human Rights called the rule “a dangerous misapplication of biotechnology,” arguing that it “would populate the CODIS DNA forensic database with information of highly questionable value while stigmatizing immigrants and subjecting them to risks when inevitable mistakes in DNA forensics are made.”

“Issues of lab contamination, statistical errors, errors by lab technicians, and contamination during the collection process can reduce the accuracy of DNA testing, especially when collected under field (rather than laboratory) conditions,” the group wrote in a public comment submitted to the Federal Registry last year while the rule was under consideration.

“Finally, the costs and resource demands of this proposed task will certainly exceed the capacity of agencies already struggling to provide basic services like water, food, and soap for those in custody,” the group added.

U.S. Customs and Border Protection repeatedly came under fire last year for the harsh conditions of its Border Patrol stations and other facilities, where thousands of migrants — including very young children and pregnant women — were held, at times, for weeks in packed concrete cells, and with limited access to basic medicine, nutrition and sanitation.

The administration estimated the added cost to DHS from the new rule — “on the assumption that collection of about 748,000 additional samples annually would be phased in over a 3-year period” — at $5.1 million, plus $4 million for the FBI to produce the additional test kits. The administration noted that further costs would arise associated with postage, and the storage and analysis of the additional DNA samples, but did not assign a price estimate.

The Obama administration had previously determined that collecting DNA from the hundreds of thousands of people apprehended along the border each year had limited value and was not logistically feasible.

DHS in January began collecting limited DNA samples from detained migrants under a pilot of the rule, and the agency will gradually work to expand that collection, officials from DHS and the Justice Department told reporters Thursday.

They said the DNA collected would inform the CODIS database and would not be used for other purposes.