MILWAUKEE — The FBI on Friday arrested a Milwaukee judge accused of helping a man evade immigration authorities, escalating a clash between the Trump administration and the judiciary over the Republican president's sweeping immigration crackdown.

FBI Director Kash Patel announced on social media the arrest of Milwaukee County Circuit Court Judge Hannah Dugan, who he said ''intentionally misdirected'' federal agents away from a man they were trying to take into custody at her courthouse last week.

''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 wrote.

Dugan was taken into custody by the FBI on Friday morning on the courthouse grounds, according to U.S. Marshals Service spokesperson Brady McCarron. She appeared briefly in federal court in Milwaukee later Friday before being released from custody. Her next court appearance is May 15.

''Judge Dugan wholeheartedly regrets and protests her arrest. It was not made in the interest of public safety," her attorney, Craig Mastantuono, said during the hearing. He declined to comment to an Associated Press reporter following her court appearance.

Dugan is charged with ''concealing an individual to prevent his discovery and arrest'' and obstructing or impeding a proceeding. She's accused of escorting the man, Eduardo Flores-Ruiz, and his lawyer out of the courtroom through the jury door on April 18 as a way to help avert his arrest, according to an FBI affidavit filed in court.

The affidavit suggests that Dugan was alerted to the presence of U.S. Immigration and Customs Enforcement agents in the courthouse by her clerk, who was informed by an attorney that they appeared to be in the hallway.

The affidavit describes Dugan as ''visibly angry'' over the arrival of immigration agents in the courthouse and says that she pronounced the situation ''absurd'' before leaving the bench and retreating to her chambers. It says she and another judge later approached members of the arrest team inside the courthouse, displaying what witnesses described as a ''confrontational, angry demeanor.''

She asked one of the officers if they had a judicial warrant and was told that the warrant was instead administrative. After a back-and-forth over the warrant, the affidavit says, she demanded that the arrest team speak with the chief judge and led them away from the courtroom.

After directing the arrest team to the chief judge's office, investigators say Dugan returned to the courtroom was and was heard saying words to the effect of ''wait, come with me'' before ushering Flores-Ruiz and his lawyer through a jury door into a non-public area of the courthouse. The action was unusual, the affidavit says, because ''only deputies, juries, court staff, and in-custody defendants being escorted by deputies used the back jury door. Defense attorneys and defendants who were not in custody never used the jury door.''

Dugan's arrest comes amid a growing feud between the Trump administration and the judiciary over the president's executive actions on immigration and other matters. Trump administration officials have sharply criticized what they have described as ''activist'' judges they say claim have overstepped their authority and unfairly impinged on the president's executive powers by blocking many of his efforts.

U.S. Sen. Tammy Baldwin, a Democrat who represents Wisconsin, called the arrest of a sitting judge a ''gravely serious and drastic move'' that ''threatens to breach'' the separation of power between the executive and judicial branches.

''Make no mistake, we do not have kings in this country and we are a Democracy governed by laws that everyone must abide by," Baldwin said in an emailed statement. "By relentlessly attacking the judicial system, flouting court orders, and arresting a sitting judge, this President is putting those basic Democratic values that Wisconsinites hold dear on the line."

The case is similar to one brought during the first Trump administration against a Massachusetts judge, who was accused of helping a man sneak out a back door of a courthouse to evade a waiting immigration enforcement agent.

That prosecution sparked outrage from many in the legal community, who slammed the case as politically motivated. Prosecutors dropped the case against Newton District Judge Shelley Joseph in 2022 under the Democratic Biden administration after she agreed to refer herself to a state agency that investigates allegations of misconduct by members of the bench.

The Justice Department had previously signaled that it was going to crack down on local officials who thwart federal immigration efforts.

The department in January ordered prosecutors to investigate for potential criminal charges any state and local officials who obstruct or impede federal functions. As potential avenues for prosecution, a memo cited a conspiracy offense as well as a law prohibiting the harboring of people in the country illegally.

''No one is above the law,'' Attorney General Pam Bondi said in a social media post Friday.

Dugan was elected in 2016 to the county court Branch 31. She also has served in the court's probate and civil divisions, according to her judicial candidate biography.

Before being elected to public office, Dugan practiced at Legal Action of Wisconsin and the Legal Aid Society. She graduated from the University of Wisconsin-Madison in 1981 with a bachelor of arts degree and earned her Juris Doctorate in 1987 from the school.

___

Richer reported from Washington. Associated Press reporter Eric Tucker in Washington contributed.