Last week, William Calhoun was in one Georgia courtroom representing people accused of crimes.

This week, a judge in another declared Calhoun, who allegedly bragged online about storming into the office of House Speaker Nancy Pelosi (D-Calif.) on Jan. 6, was too dangerous to let out of jail.

“Because of the corrupting and dangerous ideology that has poisoned this man’s mind, he has no respect for the laws of the United States or the people who enforce those laws,” Magistrate Judge Charles Weigle said. If Calhoun was released, the judge said, “I would be afraid for my life.”

By attacking the Capitol with a right-wing mob seeking to stop then-President-elect Joe Biden from taking office, Weigle said, Calhoun, a private defense attorney, “crossed a sacred, sacred line.”

Federal prosecutors have asked for detention in a only handful of the criminal cases brought against alleged participants in this month’s attack on the Capitol. Along with Calhoun, the government is seeking to detain an ousted Sacramento leader of a GOP volunteer organization who was arrested Tuesday.

“You will all die,” Jorge Riley, formerly the corresponding secretary of the California Republican Assembly, wrote in a since-deleted Facebook post two days after the Capitol siege, the FBI alleged.

The assistant federal defender for Riley did not respond to a request for comment.

Prosecutors also want to keep Couy Griffin — a New Mexico county commissioner and founder of the group Cowboys for Trump who has a history of violent rhetoric — behind bars.

According to charging documents, after the riot Griffin vowed to return for Biden’s inauguration, saying in a video, “There’s gonna be blood running out of that building.”

The government did not seek to detain a 22-year-old woman accused of aiding the theft of Pelosi’s laptop and making plans to sell it to the Russian government. Riley June Williams, 22, was allowed to go home to her mother in Harrisburg, Pa.

“They are being judicious. They are trying to be reasonable,” Magistrate Judge G. Michael Harvey of the District of Columbia said Thursday as he ruled in favor of detention for a South Florida man who was arrested during an apparent attempt to return to D.C. this week. “They are only making these arguments where there truly is a risk.”

Calhoun was one such risk, prosecutor Leah McEwen argued in a Macon, Ga., federal court Thursday. She walked Weigle through dozens of Calhoun’s comments on Facebook, Twitter and Parler, in which he repeatedly advocated “slaughtering” or “executing” communists, Democrats and Black Lives Matter activists.

“We’ve got to get serious about stopping them with the force of arms,” he wrote in one post. “I’m a lawyer saying these things.”

Public defender Timothy Saviello told the court that while Calhoun might have a “big mouth,” that was “part of the conversation on Twitter.” As with former president Donald Trump, he argued, any pernicious influence his client had was neutralized when he was banned by the major social networks.

“We’re in an unusual situation,” Saviello said. “Mr. Calhoun is the rare defendant who understands what it means to go to court when you’re required to. . . . He has clients depending on him.”

McEwen said the threats were real and borne out by Calhoun’s presence in Pelosi’s office on Jan. 6. He also did not turn himself into law enforcement, she said, and instead was found at his sister’s home in Macon, 75 miles from home, with brass knuckles, multiple guns and hundreds of rounds of ammunition.

“Everything he has said that he would do in those posts, short of executing and stacking up body bags, he has done,” she said.

Weigle agreed, saying he feared that if he sent a probation officer to Calhoun’s house the lawyer would consider it a salvo from the “deep state” and respond with violence.

“When you and your friends went in there and tore the place to shreds, killed five people including a police officer, you showed . . . that there was nothing that would hold you back except force,” the judge said.

Griffin, 47, was supposed to have a bond hearing Thursday, but he is quarantined in a D.C. jail until he agrees to be tested for the coronavirus.

Correction: This story has been updated to correct the spelling of Leah McEwen’s name.

Amy Worden and Marisa Iati contributed to this report.