The Plymouth County Sheriff’s Office is ending a partnership with U.S. Immigration and Customs Enforcement that has allowed its officers to perform certain functions of federal immigration agents.

Sheriff Joe McDonald told WATD radio on Friday that his office is giving notice to ICE to terminate the so-called 287(g) program “purely as a management decision,” and that the decision has nothing to do with ongoing calls from civil rights activists to end detention of immigrants. The agreement is renewed annually.

“We just don’t have the staffing and wherewithal to keep it going,” he said. But “we’re still a facility that holds detainees on behalf of immigration and customs, and that’s not going to change,” said McDonald.

The organization will continue its over two-decade long housing contract with the immigration agency, and is currently detaining around 100 immigrants for ICE, according to a spokesman.

The Sheriff’s Office says four employees were trained by ICE to use their computers and software to check if anyone held by the county on criminal charges who had self-identified as foreign born was wanted by ICE for other reasons.

Two of those staffers retired, and the county is having trouble recruiting to fill the positions, and can’t send remaining employees off for the specialized training.

McDonald said that between 2017 to 2019, the county has 5,040 intakes, and only 6.4% were ICE detainees. Of those individuals, he said five were deported.

Spokesman John Birtwell said since the beginning of the pandemic, the number of bookings for the county have diminished significantly, while the virus has place a burden on staff to keep the population healthy. Birtwell said that about 600 individuals are currently detained at the county jail, including ICE detainees, and people being held for pretrial detention. That’s down from 1,700 before the pandemic.

The 287g agreements allow officers to interview already-detained people in county jails about their immigration status, check the Department of Homeland Security’s databases for information on those individuals, issue detainers to hold individuals set to be released so that ICE can then detain them, and share any information with ICE. They can also recommend and begin the process of deporting individuals.

The information sharing and deputization of local officials to do immigration agent work has been the cause of lawsuits and ire from social justice groups.

“Detained immigrants, their families, and communities have fought for over a decade to end the 287(g) program because it entangles state and local agencies with federal immigration enforcement,” said Laura Rótolo, staff counsel at the ACLU of Massachusetts in an emailed statement.

The organization said its glad to see the Plymouth contract end, and called on Barnstable County Sheriff’s Office and the Department of Corrections to end their programs too.

Legal advocacy group Lawyers for Civil Rights also sued the county in the state Supreme Judicial Court to end arrest and detention of anyone on federal civil immigration charges, claiming sheriffs might not have the authority to make those agreements with ICE. That’s because in 2017 the court ruled that local law enforcement had no authority to detain people solely because of a federal civil immigration violation.

“Sheriff McDonald has made the right move by terminating this unlawful agreement,” said Oren Sellstrom, Litigation Director of Lawyers for Civil Rights. “287(g) agreements have long been maligned, locally and nationally, as a significant source of fear for immigrant communities, and as a drain on state resources.”

Massachusetts is the only state in New England to have 287(g) contracts.

“Lots of the social justice groups tend to mix their metaphors as well when it comes to this,” said McDonald on WATD. “What they’re objecting to is the fact that we’re holding anyone at all on behalf of ICE. I think those partnerships are very important to us, and they enhance public safety.”

But sometimes, sheriffs don’t get the final say on a relationship with ICE. In May 2021, DHS ended its 287g agreement with Bristol County Sheriff’s Office over ongoing investigations of alleged civil rights violations.