Federal officials on Tuesday launched a controversial program in the District that targets illegal immigration, but not without a fight from some city officials who argue the effort undermines trust between police and local immigrant communities.

The program, Secure Communities, requires that arrestee fingerprints collected by local governments be shared with U.S. Immigration and Customs Enforcement so the federal government can identify illegal immigrants and potentially move to detain or deport them. All other localities in the metropolitan area have been participating.

But the D.C. Council on Tuesday quickly voted to limit the program’s reach, saying it could discourage immigrants who are crime victims or witnesses from working with police, ultimately making the city less safe.

Secure Communities calls for local jurisdictions to hold a suspected illegal immigrant who has been arrested for 48 hours so ICE can interview the detainee and decide whether to seek deportation.

The D.C. Council unanimously passed a bill to detain only those who have been previously convicted of a “dangerous” crime and only for an additional 24 hours beyond the time they would otherwise be held. Under the legislation, the city would hold people only if the federal government paid for the additional day of incarceration. And it would prohibit city officials from participating in a “generalized search of or inquiry about inmates” conducted by federal authorities. Mayor Vincent C. Gray (D) is expected to sign the bill.

Danielle Bennett, spokeswoman for ICE, said in a statement that the agency “anticipates that law enforcement agencies will comply” with the 48-hour detainer, though “ICE has not sought to compel compliance through legal proceedings. Jurisdictions that ignore detainers bear the risk of possible public safety risks.”

Council member Phil Mendelson (D-At Large), chairman of the council’s public safety and judiciary committee, said the legislation is needed to keep the federal government from “using local government for federal immigration enforcement.”

“That works against community policing,” Mendelson said. “We want people who are victims to report crime, and we want witnesses to report crime.”

Kristopher Baumann, head of the D.C. police union, disagreed, calling Mendelson’s and others’ comments about the program “fear mongering.”

“This was a program in place that would actually help keep people safe and keep bad folks out of the streets,” Baumann said.

Bennett said the implementation of Secure Communities, started by the federal government in 2008, has been staggered so the agency can cope with the new data.

From March 2009, when Fairfax County activated the program, through March 2012, 1,246 people were removed from the county through the initiative, and 408 of them had committed serious crimes, such as murder or drug trafficking, or were considered threats to national security, according to ICE. Prince George’s County, which started the program in December 2009, has removed 493 people. Since the program’s start in Montgomery County in February, there have been no deportations there.

D.C. politicians have long opposed Secure Communities.

In October, Gray signed an executive order that bars D.C. police and corrections officials from asking those they come in contact with about their immigration status. They also will not enforce an ICE detainer or warrant issued against someone who has not committed another crime.

Bennett said the program does not put any additional requirements — such as forcing police to actively check someone’s immigration status — on local governments. She said ICE does not direct local police on how or when to collect the fingerprints, which are sent to the FBI and then ICE.

D.C. Police Chief Cathy L. Lanier said in a statement that the onset of Secure Communities would not change the way officers interact with people in the community.

“The members of the police department will not be involved in the identification of undocumented foreign nationals or the enforcement of civil immigration laws,” Lanier said. “Additionally, we will continue to proactively protect witnesses and victims of crime through all available means.”

According to Pedro Ribeiro, a Gray spokesman, the problem with the program is when undocumented people worry that they will run into trouble with ICE, whether or not they would actually be subject to removal. For instance, he said, an undocumented domestic-abuse victim may be reluctant to report the crime, fearing deportation.

“It’s one of these things where local law enforcement and local elected officials know what’s best for their communities, not the secretary of homeland security,” Ribeiro said.

Staff writers Mike DeBonis and Tim Craig contributed to this report.