He added, “It encourages people to stay in those communities, when in fact the policies ought to be discouraging those people.”

But Ms. Juega said she and her fellow advocates in Trenton were motivated by a desire to “allow this population that is increasingly marginalized to have some semblance of a normal life.”

About 23 percent of Trenton’s 83,000 residents are immigrants, mostly Latinos, according to the 2008 American Community Survey. Many do not have legal immigration documents, advocates say.

Trenton’s ID program, which began in May 2009, met with minimal resistance among city officials, said Detective Bob Russo of the Office of Community Affairs in the Trenton Police Department, who has been a major proponent. “I’ve had a few colleagues who were against it,” he said. “But we stressed that you’re not giving this person any pass or anything like that, you’re just accepting that person as a member of the community.” City and police officials are under orders not to ask residents about their immigration status, unless it is in connection with a felony.

Still, only about 1,300 people in Trenton have stepped forward to get the cards. Some immigrants have been wary, despite promises that the information they provided would remain confidential.

Two days after New Haven lawmakers approved the nation’s first plan to offer cards in 2007, federal agents from Immigration and Customs Enforcement began a series of arrests in the area that sent 32 immigrants to detention centers around New England — a move that the mayor, John DeStefano Jr., described as retaliation. By the time city officials issued the first IDs, called Elm City Resident Cards, many residents were afraid to come forward.

Some other communities waited to see if there were legal challenges to the New Haven program, but none surfaced. Opponents of the program filed an open records request seeking the participants’ names and addresses. The city’s refusal was upheld by the Connecticut Freedom of Information Commission, said Michael J. Wishnie, a Yale law professor who helped develop the program and was retained by the city to help defend it in the event of lawsuits.