Race may be the deciding factor in whether you’re deemed innocent in a court of law.

That’s the takeaway from a study for the National Registry of Exonerations, published on Tuesday. Researchers Samuel Gross, Maurice Possley, and Klara Stephens analyzed years of exoneration data, looking at how race may influence whether someone is wrongfully convicted — and later cleared — of a crime they didn’t commit.

“African Americans are only 13% of the American population but a majority of innocent defendants wrongfully convicted of crimes and later exonerated,” the researchers write. “They constitute 47% of the 1,900 exonerations listed in the National Registry of Exonerations (as of October 2016), and the great majority of more than 1,800 additional innocent defendants who were framed and convicted of crimes in 15 large-scale police scandals and later cleared in ‘group exonerations.’”

Here are the topline results, taken from the study:

For murders, researchers found not just that black people were more likely than white people to be wrongfully convicted, but that innocent black people spent more time in prison before they were exonerated:

“Judging from exonerations, innocent black people are about seven times more likely to be convicted of murder than innocent white people.”

“African Americans imprisoned for murder are more likely to be innocent if they were convicted of killing white victims. Only about 15% of murders by African Americans have white victims, but 31% of innocent African-American murder exonerees were convicted of killing white people.”

“The convictions that led to murder exonerations with black defendants were 22% more likely to include misconduct by police officers than those with white defendants.”

“Exonerations of innocent murder defendants take longer if the defendant is black, 14.2 years on average, than if he is white, 11.2 years. For death row exonerations in the Registry the average delays and the difference by race are larger, 16 years for black defendants and 12 years for whites”

There were similar findings for sexual assault:

“Judging from exonerations, a black prisoner serving time for sexual assault is three and-a-half times more likely to be innocent than a white sexual assault convict. The major cause for this huge racial disparity appears to be the high danger of mistaken eyewitness identification by white victims in violent crimes with black assailants.”

“Assaults on white women by African-American men are a small minority of all sexual assaults in the United States, but they constitute half of sexual assaults with eyewitness misidentifications that led to exoneration.”

“African-American sexual assault exonerees received much longer prison sentences than white sexual assault exonerees, and they spent on average almost four-and-a-half years longer in prison before exoneration. It appears that innocent black sexual assault defendants receive harsher sentences than whites if they are convicted, and then face greater resistance to exoneration even in cases in which they are ultimately released.”

And much of the same was true for drug crimes:

“The best national evidence on drug use shows that African Americans and whites use illegal drugs at about the same rate. Nonetheless, African Americans are about five times as likely to go to prison for drug possession as whites — and judging from exonerations, innocent black people are about 12 times more likely to be convicted of drug crimes than innocent white people.”

“Why do police officers who conduct these outrageous programs of framing innocent drug defendants concentrate on African Americans? The simple answer: Because that’s what they do in all aspects of drug-law enforcement. Guilty or innocent, they always focus disproportionately on African Americans. Of the many costs that the War on Drugs inflicts on the black community, the practice of deliberately charging innocent defendants with fabricated crimes may be the most shameful.”

Overall, the study paints a very clear picture: Black people are disadvantaged within the criminal justice system, leading to massive disparities even among those who are entirely innocent.

“The causes we have identified run from inevitable consequences of patterns in crime and punishment to deliberate acts of racism, with many stops in between,” the authors conclude. “They differ sharply from one type of crime to another.”

For example, the researchers found that some of the disparity is driven in large part by higher murder rates in black communities. “If the real criminal is black, anybody who is mistakenly convicted for that crime will almost inevitably be black as well,” they wrote.

But the researchers found that law enforcement misconduct and racism also played major roles, such as police deliberately targeting black people for raids, arrests, and false confessions, witnesses identifying the wrong suspect (“a notoriously error-prone process when white Americans are asked to identify black strangers”), and preexisting racial biases among jurors and judges influencing convictions and sentences.

A caveat: The study only looked at raw data for exonerations and, in some cases, the general population. The researchers stress that their data likely does not cover all innocent people in prison, given that there are likely thousands of innocent people in prison who have yet to be — or never will be — exonerated. And just looking at the broad raw data likely misses some nuances in some individual cases, such as how criminal histories explained differences in prison sentences or attempts to seek exoneration.

Still, the data implicates the criminal justice system as vastly racially disparate — not only prosecuting and imprisoning the innocent, but doing so in large part because of their race. It is just the latest evidence, then, that America’s criminal justice system is far from fair and equal.

Watch: How mandatory minimums helped drive mass incarceration