PHILADELPHIA Mayor Nutter is poised to sign an executive order largely ending a controversial agreement that allowed federal agents to detain undocumented immigrants arrested in the city on even minor offenses.

City Councilman James F. Kenney, who called for a hearing on the policy, said letting U.S. Immigration and Customs Enforcement (ICE) hold prisoners based on their immigration status has "a chilling effect on people who would think of coming here, documented or undocumented."

"People are being detained and deported unnecessarily, relative to what they did," he said. "It smacks of not wanting certain groups of people in the country."

A draft of Nutter's unsigned order, obtained by The Inquirer, would end the holds for immigrants, except those charged with first- or second-degree felonies involving violence.

Some critics of the holds say Nutter's action won't go far enough. They want the mayor to end all cooperation with ICE.

Immigrants - including those living here legally on green cards - can be deported if they are convicted of a felony. But Councilwoman Maria Quiñones Sánchez said it's not fair to hold immigrants arrested on felony charges if they would otherwise be freed on bail.

"Charging doesn't make someone guilty," she said. "What you don't want is a situation where they're deported before they're convicted."

Mark McDonald, a spokesman for Nutter, said the mayor was likely to sign an order in "a few weeks," but he would not discuss its contents. McDonald said the agreement with ICE had been under discussion since summer.

"I think the feeling is, we addressed the overwhelming amount of concerns, but not all of them," he said, adding, "We don't have a finished product."

The agreement with ICE has given the agency access to the city's offender database, which lists a person's country of origin, since 2008.

Under pressure from advocates, the city made changes in 2010 so that ICE agents would not be able to see information on victims and witnesses.

Nutter said at the time that allowing ICE access to that information would discourage immigrants from cooperating with police.

Advocates for immigrant communities have been fighting to end cooperation with ICE here and in other cities, saying the policy traumatizes those communities and wastes taxpayer dollars on jailing people who would otherwise be released.

Philadelphia participates in several immigration enforcement programs, some of which are federally mandated, and others, such as "ICE holds," that are "nonmandatory requests" for assistance, said Nicole Kligerman, a spokeswoman for the New Sanctuary Movement of Philadelphia.

She said about 17 localities have banned or modified ICE holds, including Miami, San Francisco, Newark, New Orleans, and New York City.

"There's no reason why the City of Brotherly Love can't follow that national trend," she said.

But New Sanctuary and other groups also complained that they had not been consulted about the executive order. (McDonald said the administration met with advocates in the summer to hear their concerns.)

Erika Almiron, executive director of Juntos, a South Philadelphia group for Latino immigrants, said advocates had not seen a copy of the draft order.

"We are asking for transparency," she said. "The immigrant community should have some involvement and voice about what it looks like."