Two cousins with extensive criminal records were sentenced Wednesday to 45 days in jail for storming the U.S. Capitol during the pro-Trump insurrection on January 6.

Edward Hemenway of Virginia and Robert Bauer of Kentucky asked for probation, but District Judge Tanya Chutkan said incarceration in this case was the only way to deter future violence.

"What you're being punished for is the decision to take that protest and turn it into a violent occupation of the U.S. Capitol... at a time when we were attempting the peaceful transfer of power. Something that has never been interrupted in our country's history," Chutkan said.

She rebuked the pair for reveling in the destruction that day, saying they "clearly celebrated what was going on" and "looked elated" in the pictures they posted form Capitol grounds.

A total of 17 rioters have been sentenced so far, out of more than 630 people facing criminal charges. Three of the four defendants who were sentenced this week received some jail time.

Bauer and Hemenway pleaded guilty to a misdemeanor for illegally protesting in the Capitol, which has become the Justice Department's go-to plea deal for many of the nonviolent rioters.

Their criminal records factored into Chutkan's decision to send them to jail. Hemenway spent five years in prison for sexually assaulting and illegally detaining a woman in 2006. Bauer has several drug convictions dating back to 1999, though he has been sober for the last 15 years.

"I'm sorry to the families of the people that work in the Capitol, that had to go through that," Bauer said. "I honestly wish it wouldn't have happened altogether. I'm really sorry I added to it."

Hemenway told the court that he's a self-employed truck driver and sole breadwinner in his family, which "will be forced to start selling things" to pay bills while he is serving his sentence.

"The sad part is, we weren't even 100 per cent Trump supporters," Hemenway said. "Neither one of us was totally into the guy. We were supposed to go to the rally for a few hours, then take my cousins back to the airport. Instead, we entered the Capitol, and that's how we ended up here today."