The American Civil Liberties Union of California on Thursday criticized Immigration and Customs Enforcement agents from the Bakersfield office for repeatedly going to local courthouses to arrest immigrants suspected of being in the country illegally.

Attorneys for the ACLU and the organization's Immigrants' Rights Project sent a letter to ICE Acting Director John Sandweg demanding agents stop arresting individuals who are attempting to pay fines, attend court appearances, get married or obtain restraining orders.

ICE officials said in a statement Thursday evening that the identification and removal of criminal offenders remains ICE's highest priority. Nevertheless, officials said they will review the letter to determine whether the actions described are consistent with the federal agency's existing policy.

The letter from the ACLU, along with a separate news release, detailed several instances of what the group described as "indiscriminate sweeps through Kern County courthouses," including the detention last month of a man from India who was about to get married when ICE agents disrupted the ceremony and detained and arrested the groom. Other cases cited by the group include local residents who were detained as they were attempting to pay fines for traffic infractions or obtain a restraining order.

ACLU attorneys said the activities could force individuals to avoid courthouses altogether.

"ICE is punishing people for attempting to comply with the law or access important court services, like marriage licenses and restraining orders," Michael Kaufman, staff attorney with the ACLU of Southern California said in the release. "By scaring people away from courthouses, ICE is undermining the public health and safety of the entire Kern County community."

Julia Harumi Mass, staff attorney at the ACLU of Northern California, noted that many sensitive locations are deemed off-limits by ICE's own rules.

"Just as schools and places of worship are considered sensitive locations that are off-limits to immigration enforcement, courthouses should be safe and accessible for all Californians," she said.

The letter to Sandweg urges ICE to investigate the conduct of its Bakersfield office and take immediate steps to put an end to the practices in Kern County. The letter further requests that ICE modify its nationwide policies and trainings clarifying that courthouses are sensitive locations where ICE agents are prohibited from conducting enforcement actions absent extraordinary circumstances. ICE agents have conducted courthouse arrests in other locations as well, the letter said, including Santa Clara.