Citing the cost of managing anti-ICE protests outside one of its facilities, authorities in a Northern California county this week severed a $3 million contract with U.S. Immigration and Customs Enforcement that allowed the federal agency to detain illegal immigrants in one of its cities.

Contra Costa County, across the bay from San Francisco, thus became the second county in the region this month to cut ties with ICE, the San Francisco Chronicle reported.

The county's West County Detention Facility, in Richmond, which averaged 200 immigrant detainees a day, had drawn protesters for months. At a news conference, Sheriff David Livingston suggested the demonstrations played a large role in the contract’s termination.

Local authority had become “overshadowed by the attention the ICE contract brings,” Livingston said, and “managing protests in Richmond have become expensive and time-consuming for our staff.”

Livingstone said the federal government did not compensate for the cost of “managing protests,” but the agreement had brought in an extra $3 million in revenue – a budget deficit, Livingstone said would be backfilled with state and county funds, the Los Angeles Times reported.

An ICE spokesman said Tuesday the decision to cut ties will hurt detainees the most.

“[I]nstead of being housed close to family members or local attorneys, ICE may have to depend on its national system of detention bed space to place those detainees in locations farther away,” the spokesman said.

“[I]nstead of being housed close to family members or local attorneys, ICE may have to depend on its national system of detention bed space to place those detainees in locations farther away.” — ICE spokesman

A county official, while personally disagreeing with President Donald Trump’s immigration policies, echoed the ICE spokesman’s argument.

“Unfortunately, with the closure of this facility, individuals that ICE is not able to release through normal processes will be sent to other facilities and will no longer have easy access to family members during a trying time,” said Karen Mitchoff, chair of the county Board of Supervisors.

“Unfortunately, with the closure of this facility, individuals that ICE is not able to release through normal processes will be sent to other facilities and will no longer have easy access to family members during a trying time.” — Karen Mitchoff, chair, Contra Costa County Board of Supervisors

Opponents of the contract called the severing a step in the right direction, but said more radical measures were needed.

Ali Saidi of the Contra Costa Immigrant Rights Alliance, derided ICE’s statement as “disingenuous” and called for the illegal immigrants to be released rather than transferred to another facility.

“[A]ll they have to do is not keep people imprisoned for civil immigration proceedings,” Saidi said.

The contract, which has been in place since 2009, requires a 120-day notice of termination.