Homeland security officials said the new initiative was permitted under the DNA Fingerprint Act of 2005. Until now, immigrant detainees have been exempt from the law, they said, because of an agreement between two Obama administration officials, Attorney General Eric H. Holder Jr. and the homeland security secretary, Janet Napolitano.

A letter in August to the White House from the Office of Special Counsel cited an official whistle-blower complaint alleging that immigration agencies had failed to carry out their full obligations under the law to collect DNA. It suggested that immigration authorities such as Customs and Border Protection already were carrying out limited DNA collections.

“The agency’s noncompliance with the law has allowed subjects subsequently accused of violent crimes, including homicides and sexual assault, to elude detection even when detained multiple times by C.B.P. and Immigration and Customs Enforcement (ICE),” said the letter, signed by Henry J. Kerner, the special counsel. “This is an unacceptable dereliction of the agency’s law enforcement mandate.”

The officials said the proposed rule was inspired partly by a pilot program conducted this summer along the southwestern border, in which ICE agents used rapid DNA sampling technology to identify “fraudulent family units” — adults who were using children disguised as their own to exploit special protections for families with immigrant children.

The new program would differ from the pilot in that it would provide a comprehensive DNA profile of individuals who are tested, as opposed to the more narrow test that was used only to determine parentage. And unlike the testing under the pilot program, the results would be shared with other law enforcement agencies.

After the DNA samples are taken, they would be entered into the F.B.I.’s highly regulated national DNA database. Known as CODIS, the Combined DNA Index System is used by state and law enforcement authorities to help identify criminal suspects. It is advertised on the bureau’s website as a “tool for linking violent crimes.”

In supplying the F.B.I. and other law enforcement with the DNA of immigration detainees, federal authorities are jumping into an ethical debate about the use of DNA in criminal investigations. While such sampling has been crucial in securing thousands of prosecutions over the past several decades, it has also generated controversy because of the potential for abuse.