Russell Leaks had more reason to be concerned about the coronavirus than the average person. The 66-year-old Tennessee cook has chronic liver disease, high blood pressure, an irregular heartbeat, and the aftereffects of a heart attack. And he was in jail, where the virus spreads quickly.

While awaiting final court action on a parole violation charge, Leaks received COVID-19 in late November. He was so out of breath from the disease that he couldn’t even talk on the phone with family. He finally recovered in early January after receiving what he described as “minimal medical treatment” at the jail.

Leaks is one of many incarcerated people across the country who have fought the dangers of COVID-19 by combining their names and experiences with lawsuits filed over health conditions in jails and prisons. They have filed lawsuits against correctional and detention facilities, as well as government officials, alleging that their treatment violated the United States Constitution.

Dozens of cases were filed by lawyers from the American Civil Liberties Union, local attorneys, and large law firms that took on the cases for free. The lawsuits asked courts to reduce jail and prison populations, eliminate overcrowding that makes social distancing difficult, or take steps to protect older and medically vulnerable detainees like Leaks. One lawsuit asked a court to give jail inmates first priority for COVID-19 vaccines.

Many of the lawsuits were dismissed. However, a few were successful, preventing thousands of incarcerated people — as well as the corrections officers and administrators who supervise them — from becoming ill or dying from COVID-19.

In Oregon, a federal lawsuit challenged the state’s decision to prioritize COVID-19 vaccinations for people who live or work in congregate care facilities such as nursing homes, as well as people who work in jails or prisons — but not for the incarcerated. The Oregon Justice Resource Center and other civil rights attorneys filed the case, alleging violations of prisoners’ Eighth Amendment right to be free from cruel or unusual punishment.

Officials in Colorado’s Weld County reached an agreement that requires them to identify medically vulnerable inmates when they are booked into the county jail and to monitor them for COVID-19 symptoms. According to the agreement, the jail must provide masks to inmates and isolate those who test positive for the disease.

In North Carolina, officials agreed to settle a civil rights lawsuit brought by the NAACP and other civil rights organizations by releasing an estimated 3,500 inmates from state prisons. The agreement marked one of the largest prison releases in the United States as a result of a COVID-19 lawsuit.

As of April 27, at least 396,295 people in US prisons had tested positive for the coronavirus. In total, 298,966 people have recovered. According to the data, at least 2,575 prisoners have died as a result of coronavirus-related causes. According to a September report by the National Commission on COVID-19 and Criminal Justice, the average COVID-19 mortality rate in prisons was more than double that of the general population after adjusting for age, gender, race, and ethnicity of those incarcerated.

Because local jails and detention centers hold people awaiting trial, the true infection rate and death count for incarcerated people is almost certainly higher.

Vaccine distribution to prisoners has been slow, even though the shots are now available to the general public. However, in some states, prisoners fared better. By April 27, two out of every five North Carolina prisoners and four out of every five North Dakota prisoners had been fully vaccinated.

Even states that prioritized the incarcerated have not always found eager takers, mirroring how the general public has responded to COVID-19 vaccinations.

In late December, attorneys for the Shelby County sheriff’s office, which runs the jail, reached a tentative settlement with lawyers for the jail detainees. The agreement includes a consent decree requiring the appointment of an independent inspector to investigate the jail’s response to COVID-19, particularly with regard to medically vulnerable detainees.

The consent decree incentivizes officials to improve detainee housing and hygiene, as well as to expedite COVID-19 vaccinations. The decree will remain in effect until the state and federal governments declare the coronavirus pandemic to be over, or until detainees who have been in custody for more than 14 days and agree to be vaccinated are given vaccines.