It’s a common refrain from some of those charged in the Jan. 6 riot at the U.S. Capitol and their Republican allies: The Justice Department is treating them harshly because of their political views while those arrested during last year’s protests over racial injustice were given leniency.

Court records tell a different story.

An Associated Press review of documents in more than 300 federal cases stemming from the protests sparked by George Floyd’s death last year shows that dozens of people charged have been convicted of serious crimes and sent to prison.

The AP found that more than 120 defendants across the United States have pleaded guilty or were convicted at trial of federal crimes including rioting, arson and conspiracy. More than 70 defendants sentenced so far have gotten an average of about 27 months behind bars. At least 10 received prison terms of five years or more.

The dissonance between the rhetoric of the rioters and their supporters and the record established by courts highlights both the racial tension inherent in their arguments — the pro-Donald Trump rioters were largely white and last summer’s protesters were more diverse — and the flawed assessment at the heart of their claims.

“The property damage or accusations of arson and looting from last year, those were serious and they were dealt with seriously, but they weren’t an attack on the very core constitutional processes that we rely on in a democracy, nor were they an attack on the United States Congress,” said Kent Greenfield, a professor at Boston College Law School.

To be sure, some have received lenient deals.

At least 19 defendants who have been sentenced across the country got no prison time or time served, according to the AP’s review. Many pleaded guilty to lower-level offenses, such as misdemeanor assault, but some were convicted of more serious charges, including civil disorder.

In Portland, Oregon — where demonstrations, many turning violent, occurred nightly for months after a white Minneapolis police officer killed Floyd — more than 60 of the roughly 100 cases that were brought have been dismissed, court records show.

Most of those defendants received deferred resolution agreements, under which prosecutors agree to drop charges after a certain amount of time if the defendant stays out of trouble and completes things such as community service. Some Capitol riot defendants have complained it’s unfair they aren’t getting the same deals.

Conservatives have sought to equate the attack on the Capitol with the Black Lives Matter protests, accusing Democrats of being hypocrites for not denouncing the violence after Floyd’s death as loudly as the Capitol insurrection. Some Republicans have seized on the handling of the protest cases in Portland to suggest that the Jan. 6 defendants are being politically persecuted.

Only a handful of the nearly 600 people charged in the insurrection have received their punishments so far, and just three people have been sentenced to time behind bars. The vast majority of the most serious cases — involving those accused of assaulting police officers or conspiring to block the certification of Biden’s victory — remain unresolved.

The catalysts for the riot and the demonstrations for racial justice were also fundamentally different.

The mob of Trump supporters whipped up by the former president’s lies about the election descended on the Capitol and pushed past police barriers, assaulted officers, smashed windows and sent lawmakers running in a stunning attempt to overturn the presidential election.

The demonstrations across the country after Floyd’s death were largely peaceful calls to address racial inequality and police brutality that occasionally turned violent. In some cities, protests descended into chaos after dark, with people smashing windows, looting stores, setting fires and assaulting officers.

Then-Attorney General William Barr pushed federal prosecutors to aggressively go after protesters who caused violence. Defense lawyers complained that many of the cases belonged in state court — punishments are typically lighter there — and accused Justice Department officials of carrying out a politically motivated effort to stymie the demonstrations.

Just this month, a man who was 19 at the time was sentenced to four years behind bars and ordered to pay what his lawyer said is likely to exceed $1.5 million in restitution after pleading guilty to inciting a riot last spring in Champaign, Illinois.

In the Capitol riot, dozens of defendants have been charged only with misdemeanors, and a standard plea deal has allowed many to plead guilty to a single count of demonstrating in the Capitol.

An Indiana woman who admitted illegally entering the Capitol but didn’t participate in any violence or destruction avoided jail time, and two other misdemeanor defendants got one and two months of home confinement. Two other people who were locked up pretrial were released after pleading guilty to misdemeanors and serving six months in jail.

Only one defendant convicted of a felony has received his punishment so far. Paul Hodgkins, who breached the U.S. Senate chamber carrying a Trump campaign flag, was ordered to serve eight months behind bars.

In a letter to Attorney General Merrick Garland in June, Sen. Ted Cruz, R-Texas, and four other Republican senators expressed concern about “potential unequal administration of justice” in how prosecutors have responded to the Jan. 6 riot and the Black Lives Matter protests.

One Jan. 6 defendant has similarly accused the Justice Department of selective prosecution based on different political viewpoints, comparing his case with how the department has handled charges stemming from the Portland protests.

Garrett Miller, of Texas, was wearing a T-shirt that said, “I Was There, Washington D.C., January 6, 2021,” when he was arrested. Prosecutors say Miller posted threatening messages on Twitter directed at Rep. Alexandria Ocasio-Cortez, a New York Democrat, after the riot. His lawyer said Miller isn’t trying to excuse his actions.

Federal prosecutors say Miller hasn’t presented any evidence that his case was politically motivated.

They also rejected comparisons between Miller’s actions and those of the Portland defendants, “who — despite committing serious offenses — never entered the federal courthouse structure, impeded a congressional proceeding, or targeted a specific federal official or officer for assassination.”

Meanwhile, in Utah this month, a federal judge sentenced 25-year-old Lateesha Richards to nearly two years in prison for tossing a pair of basketball shorts onto an overturned, burning patrol car and for hurling a baseball bat toward police officers during a May 2020 protest in Salt Lake City. There’s no evidence that the bat struck anybody.

Defense attorney Alexander Ramos, who had pushed for the judge to sentence Richards to the one year in jail she has already served, said the George Floyd protesters appear to be getting even more scrutiny than comparable “run-of-the mill” cases.

“If it didn’t have this political background, I think more people would have been let out,” Ramos told the AP.

Richer reported from Boston, Kunzelman from College Park, Maryland, and Billeaud from Phoenix.