NORTHAMPTON COUNTY, Pa. (CBS/AP) — A Pennsylvania county imposed restrictions on U.S. immigration agents Tuesday after a federal officer arrested a man at the courthouse, sparking a heated confrontation that was captured on video. Franklin Urrutia-Cordon, 32, went to the Northampton County Courthouse for a hearing in his drunken driving case and unexpectedly found himself in federal custody for an alleged immigration violation.

His attorney loudly protested the warrantless arrest.

Make the Road PA posted the video to Twitter.

An executive order issued Tuesday by Northampton County’s top elected official, Lamont McClure, prohibits Immigration and Customs Enforcement agents from arresting people at the county courthouse or jail unless they have a warrant signed by a federal judge.

McClure, a Democrat, said that the policy had been in the works for some time, but that Monday’s arrest of Urrutia-Cordon “was the straw that broke the camel’s back.”

ICE’s presence around courthouses has been a contentious issue nationally during the Trump administration, with courts from California to New Jersey pushing back by limiting or blocking ICE from conducting courthouse arrests. Activists for immigrants say detaining people who appear for court proceedings has a chilling effect on victims and witnesses.

Federal officials contend that such state and local restrictions are illegal and endanger the public. In a November letter to the Washington and Oregon supreme courts, U.S. Attorney General William Barr declared that immigration officers “are not subject to state rules that purport to restrict (them) from making administrative arrests on property that is otherwise open to the public and other law enforcement officers.”

ICE agents arrested two people inside a California courthouse last month, ignoring a new state law requiring judicial warrants.

In Northampton County, about 70 miles north of Philadelphia, Urrutia-Cordon was in court Monday when a plainclothes immigration agent abruptly took him into custody.

Taken by surprise, his lawyer demanded to see a warrant.

“I have a copy of it it my car,” the unnamed agent said, according to a video of the encounter released by defense lawyer Joshua Fulmer.

“That is not acceptable,” Fulmer, his voice rising, told the agent. “You must show him a warrant!”

The agent then said he was conducting an “administrative warrantless arrest.”

Urrutia-Cordon, who came to the United States from Honduras as a teenager, was taken to the York County jail to await deportation proceedings, according to Fulmer.

“My client was arrested by a federal agent with no warrant and no probable cause to do so in violation of federal law,” he said. “To have this idea that we are going to have federal agents walking around the hallways arresting people without a warrant that they think are here illegally, or undocumented, is extremely disturbing.”

Immigration agents are authorized by law to make warrantless arrests of people they have probable cause to believe are in the country illegally and are likely to flee. But Fulmer said his client had been showing up for court proceedings in his drunken driving case for more than two years without incident and was not a flight risk.

Urrutia-Cordon intended to plead guilty in hopes of resolving his case and smoothing his path to lawful permanent resident status. It was a first offense for Urrutia-Cordon, who is married to a U.S. citizen.

“It was definitely a massive shock and very unexpected,” Fulmer said of the arrest. “We were there to enter a guilty plea. We thought we had resolved the case in a way that was not going to involve immigration at all. I was caught off guard.”

McClure, the county executive, said federal court precedent gives Northampton County the right to require ICE to show up with a warrant.

“We respect the federal government’s need to enforce our immigration laws, but we also respect the need of people residing in the commonwealth to have due process,” McClure said.

ICE’s Philadelphia office had no immediate comment on Urrutia-Cordon’s arrest or the county’s new policy.

(© Copyright 2020 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)