Donald Trump's administration has unveiled a controversial new rule to collect DNA samples from undocumented immigrants and asylum seekers in federal custody, which Democrats and civil rights groups said “threatens to subvert our foundational values”.

The Justice Department unveiled the new rule on Friday morning, requiring officers with Immigration and Customs Enforcement to collect cheek swabs from migrants detained in the US. Officials would begin collecting the samples from potentially hundreds of thousands of undocumented immigrants and asylum seekers taken into federal custody each year, according to the Wall Street Journal. The rule was likely to face an uphill legal battle as it goes into effect in April.

The Trump administration said in a notice published to the Federal Register that collecting the samples from detained migrants “could be essential to the detection and solution of crimes they may have committed or may commit in the United States”.

An administration official told NBC News the samples would be sent to the FBI, to be stored in the bureau’s Combined DNA Index System, otherwise known as CODIS.

Democrats previously lambasted a pilot programme the Trump administration began in January, in which officials began sending DNA samples collected from migrants in federal custody to the FBI.

Joaquin Castro (D-TX), Rashida Tlaib (D-MI) and Veronica Escobar (D-TX) described the move as a “serious human rights issue” in a letter to Department of Homeland Security Secretary Chad Wolf last month.

“Unlike fingerprints, DNA reveals deeply personal information about individuals and their relatives. This kind of mass DNA collection could be used to surveil and implicate American citizens as well as their family members in the U.S. and abroad”, the letter read.

The lawmakers continued: “This policy reinforces the xenophobic myth that undocumented immigrants are more likely to commit crimes than US-born individuals.”

The American Civil Liberties Union has also called the move “dehumanising” following the administration’s pilot programme in January.