In 2011, lawmakers in Essex County, N.J., agreed to house detained immigrants at the local jail in exchange for what would eventually add up to around $200 million from the federal government. Across the country, hundreds of other local communities were shoring up their budgets with similar deals.

But that decision has turned into an unexpected source of tension as critics who oppose President Trump’s immigration policies have pressured the county to end to the contract. Protesters regularly amass outside the Essex County Correctional Facility carrying “Abolish ICE” signs. Activists pack public meetings demanding the county pull out of the agreement.

Lawmakers in the county, a longtime Democratic stronghold in one of the bluest regions in the nation, are now caught between their reliance on steady income from the federal government and anger from a more activist left.

“The failure of New Jersey Democrats is a microcosm of the larger Democratic Party to take any bold stand on immigrant rights,” said Whitney Strub, an associate professor of history at Rutgers University and a local activist.