Federal agents in the United States have arrested a US judge for allegedly shielding an undocumented migrant, escalating a struggle between the White House and the courts over US President Donald Trump's hardline deportation policies.
Hannah Dugan, a Milwaukee County circuit judge "intentionally misdirected federal agents away from the subject" they were intending to detain at her courthouse, Federal Bureau of Investigation (FBI) director Kash Patel said in a post on X on Friday.
She was arrested on charges of obstruction, Patel said in his post.
"Thankfully our agents chased down the perp on foot and he's been in custody since, but the Judge's obstruction created increased danger to the public," Patel said.
The Trump-appointed director deleted his post minutes after it appeared, but later reposted it.
The incident has set off a torrent of criticism by Democrats and applause by some Republicans.

Supporters of Hannah Dugan held a rally at the US Courthouse in Milwaukee. Source: AAP / Lee Matz/AP
"We're sending a very strong message today," Bondi told Fox News.
"If you are harbouring a fugitive, we don't care who you are, if you are helping hide one ... anyone who is illegally in this country — we will come after you and we will prosecute you."
Charging documents described an incident at Dugan's courthouse last Friday during which the judge was "visibly upset and had a confrontational, angry demeanour" when federal agents came to arrest the migrant — Eduardo Flores-Ruiz from Mexico — who was facing misdemeanour charges.
The complaint alleges Dugan escorted Flores-Ruiz out of the courtroom through a door used by jury members in order to keep him from the agents.

Hannah Dugan was elected to the bench in 2016. Source: AAP / Lee Matz/AP
According to the paper, her attorney Craig Mastantuono told the court: "Judge Dugan wholeheartedly regrets and protests her arrest. It was not made in the interest of public safety."
A number of federal and state judges across the US have issued rulings that put several of Trump's executive actions on hold, particularly related to his bid to exercise unprecedented powers in deporting migrants.
The Trump administration has been butting heads with federal judges, rights groups and Democrats who say he has trampled or ignored constitutionally enshrined rights in rushing to deport migrants, sometimes without the right to a hearing.
House Democrat Darren Soto criticised the Dugan arrest as "third world country dictator type of stuff", adding in a post on X that "this will be bounced out of court as quick as the rest of their illegal actions".
The Democratic National Committee's chairman, Ken Martin, expressed alarm that Trump was "having his federal goons arrest a duly elected judge".
"Brick by brick, Trump is trying to take apart our democracy," he said.
Several Republicans, however, rushed to Patel's defence.
"The corruption and determination of these anti-American activist judges to put illegal aliens ahead of American citizens is appalling," congresswoman Diana Harshbarger said on X. "Thankfully, a stand is being taken against them."
On Thursday, a former county magistrate judge in New Mexico and his wife reportedly were taken into custody after federal agents raided their home over their harbouring of an alleged undocumented migrant who investigators said was a member of Venezuela's Tren de Aragua gang.
The Trump administration has dug in its heels over deportation cases in which legal experts and Democrats say residents are being expelled without due process.
The White House has defied the Supreme Court's ruling that the administration must "facilitate" the return of a Maryland resident who was deported to a maximum security prison in El Salvador.
Bondi said the man, Kilmar Abrego Garcia, is "not coming back" to the United States.