Capitol rioter Richard Barnett, who lounged in Pelosi’s office, granted bail ahead of trial

The alleged stun gun-toting rioter photographed with his boot up on Nancy Pelosi’s desk will remain on house arrest pending the resolution of charges that could put him away for more than a decade.

A federal magistrate judge ordered the release of 60-year-old Richard Barnett on “very, very restrictive conditions” following a five-hour hearing Friday.

After posting $5,000 bail, Barnett will be under detention at his Arkansas home without internet access and must surrender his passport, according to Politico.

His release came over the objection of the U.S. Attorney’s office, which asked for another hearing so prosecutors could argue again that he’s too dangerous to be freed.

Barnett will remain behind bars until Saturday at the earliest while the court considers that request, the site said.

Barnett faces charges of disorderly conduct, theft and entering Capitol grounds with a stun-gun; a trial date has been set for March.

During Friday’s hearing, prosecutors said Barnett was a dangerous person who had tried to avoid capture by turning off location services on his phone and covering his face after images of him “making a mockery of [House Speaker Pelosi] and her office” went viral.

Federal officials also said he seemed to “very much enjoy this moment of fame,” after he put his foot on the desk of the nation’s highest ranking Democrat and boasted about stealing a document.

Prosecutors also played video of Barnett buying a stun-gun, walkie-talkies and pepper spray on New Year’s Eve. Barnett’s girlfriend testified that she encouraged him to bring the weapons to protect himself, Politico reports.

Barnett’s White Plains defense attorney Anthony Siano called about a half dozen character witnesses and highlighted the fact that Barnett and his family received threats following his prominent role in the uprising on Capitol Hill.

“He appears to be a law abiding citizen, for the most part, although there have been incidents that do cause the court concern with him being armed at rallies,” Magistrate Judge Erin Weidemann conceded.

Barnett could face a maximum of 11 and a half years in prison and a $355,000 fine if convicted.

With AP wires