DHS is developing a plan to take DNA samples from each of the undocumented immigrants. (Representational)

The US government plans to collect the DNA of all migrants detained after entering the country illegally, officials said Wednesday.

The Department of Homeland Security (DHS) is developing a plan to take DNA samples from each of the undocumented immigrants and store it in a national database for criminal DNA profiles, they said.

Speaking to journalists on grounds of anonymity, DHS officials said the new policy would give immigration and border control agents a broader picture of the migrant and detainee situation.

And stored on the FBI's CODIS DNA database, it could also be used by others in law enforcement and beyond.

"It does enhance our ability to further identify someone who has illegally entered the country," said one official.

"It will assist other organizations as well in their identification ability."

Officials said they were in fact required to take the DNA samples by rules about the handling of arrested and convicted people that were issued by the Justice Department in 2006 and 2010, but which had not been implemented.

They said the program for collecting DNA was still being developed, and they did not have a date set for implementation.

Collecting and storing the DNA of people simply detained and not tried or convicted of a crime has drawn criticism from civil rights advocates.

"Forced DNA collection raises serious privacy and civil liberties concerns and lacks justification, especially when DHS is already using less intrusive identification methods like fingerprinting," Vera Eidelman, an attorney with the American Civil Liberties Union, said in a statement.

"This kind of mass collection also alters the purpose of DNA collection from one of criminal investigation to population surveillance, which is contrary to our basic notions of freedom and autonomy," Mr Eidelman said.

Earlier this year the US Border Patrol began performing "rapid DNA" tests on migrants who cross the border as family units to determine if the individuals were actually related and were not making fraudulent claims.

The new program will collect much more genetic information than that program, and will store it.

"This is fundamentally different from rapid DNA," said a second official. "This is a more-full scope DNA profile."