A federal judge leveled criminal contempt charges Monday against senior federal law enforcement officials in a long-simmering standoff in South Dakota over the judge’s insistence that he needs to know whether deputies guarding his courtroom have been vaccinated against the coronavirus.

U.S. District Judge Charles Kornmann, who sits in Aberdeen, tore into the U.S. Marshals Service for nearly an hour over their reaction to his decision at a hearing last month to question the deputy marshal in attendance about whether she had been vaccinated.

The deputy marshal, according to the judge, refused to answer the question, at which point he ordered her out of his courtroom. The marshals, in turn, took three of the defendants scheduled for hearings that day out of the courthouse. That infuriated the judge, who describes that act as a “kidnapping” that obstructed the work of the court.

“This was such an outrageous thing to do,” the judge said at a hearing Monday, during which he spent nearly an hour laying out his rationale for accusing the three Marshals Service officials of criminal contempt and obstruction. “Nothing like this that we could find has ever been done in this country. If it is the marshals’ position that they can override court orders, they are badly mistaken.”

The judge’s decision to accuse senior federal law enforcement officials of committing crimes impeding the administration of justice is a remarkable rift not just within federal law enforcement, but for the close working relationship with the judges who run the courts and the marshals who guard them. It also highlights the degree to which no workplace is immune from fights and disagreements surrounding coronavirus safety and vaccinations.

Historically, Congress gives the marshals wide legal authority to make security decisions surrounding the federal judiciary, but the marshals are also typically deferential to the requests and demands of judges.

A spokesman for the Marshals Service declined to comment, citing the ongoing criminal case against some of its officials.

The judge noted that he had made his concerns clear in writing well ahead of the courtroom confrontation, and said his own staff had suggested that the marshals might have planned the confrontation.

The three accused of contempt are John Kilgallon, chief of staff for the U.S. Marshals Service in Washington, D.C., Daniel Mosteller, the marshal for the District of South Dakota, and Stephen Houghtaling, the chief deputy for that district.

“Each of you is charged with conspiracy to obstruct justice, contempt of court,” said the judge, setting a Sept. 13 trial date, and requesting that the U.S. attorney’s office prosecute the case. If the office declines, the judge said, he would appoint a prosecutor.

Justice Department lawyers said little during the hearing, noting that the three men were in the process of hiring criminal defense lawyers.

The battle between the federal judge and the U.S. Marshals Service had been brewing since March, when Kornmann wrote a letter to federal officials saying that he expected to know whether people working in his courtroom had been vaccinated against the coronavirus.

“We are not talking about politics or conspiracy theories. We are talking about science and protecting all of us who serve the public here as well as the jurors, lawyers and parties who come to this building,” Kornmann wrote. “If you are refusing to take the vaccines, I want to know that so I can decide what further action is required on my part.”

The marshals further drew the ire of the judge when the agency defended its position of not telling him whether individual deputies had been vaccinated by claiming that the agency itself does not know — that it has anonymous data about the percentage of vaccinated employees, but does not know individual deputies’ vaccination status. That answer raised questions among some employees, who, speaking on the condition of anonymity to describe internal correspondence, said they filled out paperwork for their supervisors identifying themselves as vaccinated. In the beginning of the year, some marshals employees uploaded copies of their vaccination cards.

“The USMS takes seriously its court security responsibilities and places the highest priority on maintaining the safety and security of those involved in the judicial process,” Kilgallon wrote to the judge last month.

He wrote that marshals’ offices around the country are down to only about 69 percent of their deputies. “This severe staffing shortage contributes to the limited number of trials and hearings which can be supported simultaneously.” Kilgallon also argued that any widespread court order that the deputies who provide security in federal courtrooms must be vaccinated “may negatively impact the ability of courts to conduct their business when such security is required.”

The judge said he found the marshals’ arguments disingenuous, and branded some of them simply false — such as the claim that one of the defendants in court on the day of the confrontation was a murderer. The judge said the defendant in question did have a prior manslaughter conviction, but added that there was a major difference between manslaughter and murder, and the defendant was in court that day on a relatively minor probation violation.

“I had always thought that the principal responsibilities of the Marshals Service was the protection of the federal judiciary,” Kornmann wrote. “As it stands now, they could well be the most dangerous people in the courtroom.”

At the start of the conflict, Kornmann said he was considering civil contempt findings against the marshals officials. At the hearing Monday, he told Justice Department lawyers that they had successfully convinced him he could not seek civil monetary penalties, and that he would therefore pursue criminal sanctions.