The US justice department will publish an amended regulation that would mandate DNA collection for almost all migrants.

The Trump administration is planning to collect DNA samples from asylum seekers and other migrants detained by immigration officials and will add the information to a massive FBI database used by law enforcement hunting for criminals, a justice department official said.

The Justice Department will publish an amended regulation on Monday that would mandate DNA collection for almost all migrants who cross between official entry points and are held even temporarily, according to the official.

The official spoke to The Associated Press on condition of anonymity because the regulation had not yet been published.

The rule does not apply to legal permanent residents, or anyone entering the US legally. Children under 14 are exempt. It’s not clear yet whether asylum seekers who come through official crossings will be exempt.

Homeland Security officials gave a broad outline of the plan to expand DNA collection at the border two weeks ago, but it was not clear then whether asylum-seekers would be included, or when it would begin.

The new policy would allow the government to amass a trove of biometric data on hundreds of thousands of migrants, raising major privacy concerns and questions about whether such data should be compelled even when a person is not suspected of a crime other than crossing the border illegally.

Civil rights groups already have expressed concerns that data could be misused, and the new policy is likely to lead to legal action.

Justice officials hope to have a pilot programme in place shortly after the 20-day comment period ends and expand from there, the official said. The new regulations are effective Monday, after the regulation is published.

Trump administration officials say they hope to solve more crimes committed by immigrants through the increased collection of DNA from a group that can often slip through the cracks.

The justice department official also said it would be a deterrent – the latest step aimed at discouraging migrants from trying to enter the United States between official crossings by adding hurdles to the immigration process.

Currently, officials collect DNA on a much more limited basis – when a migrant is prosecuted in federal court for a criminal offense. That includes illegal crossing, a charge that has affected mostly single adults.

Those accompanied by children generally aren’t prosecuted because children can’t be detained.

President Donald Trump and others in his administration often single out crimes committed by immigrants as a reason for stricter border control. But multiple studies have found that people here illegally are less likely to commit crime than US citizens, and legal immigrants are even less likely to do so.

For example, a study last year in the journal Criminology found that from 1990 through 2014, states with bigger shares of migrants have lower crime rates.

Immigrant rights advocates were immediately critical following initial disclosure of the DNA collection plans two weeks ago.

“That could really change the purpose of DNA collection from one of criminal investigation to population surveillance,” American Civil Liberties Union attorney Vera Eidleman said then.

Curbing immigration is Trump’s signature issue, but his administration has struggled in dealing with the surge of people trying to enter the United States, mostly Central American families fleeing poverty and violence.

Authorities made more than 810,000 arrests at the border during the budget year that just ended in September – a high not seen for more than 10 years.

Officials say numbers have since fallen following crackdowns, changes in asylum regulations and agreements with Central American countries, but they remain higher than in previous years.