Although fresh air and sunlight come free in Colorado, they have long been denied to hundreds of state prisoners, some of whom have gone years – and even a decade or more ­– without access to the outdoors.

That policy will soon end under a class-action settlement reached last week.

“It took six years in court, but we got everything we wanted from this lawsuit,” says Denver attorney Amy Robertson who, along with students from University of Denver’s Sturm College of Law, has pursued two federal cases to give state prisoners the right to outdoor exercise.

Colorado has long forced its highest security prisoners to spend 23 hours a day alone in their cells, with the 24th hour reserved for either a shower or exercise in an indoor exercise room. That room is roughly the same size as their regular, cement block cells, but with a pull-up bar and an open, but heavily barred window. The state long asserted that the narrow glint of fresh air and view are ample substitutes for actually being outside.

Nonsense, countered the team of civil rights lawyers, who argued that denying open air violates 8th Amendment protections against cruel and unusual punishment.

An expert witness for the plaintiffs argued that no other state – not even the federal government at its ADX Supermax prison in Florence – has deprived prisoners outdoor exposure as much as Colorado. One inmate named in the case marveled at the absurdity of describing a room with an open, but barred window as “outdoors.”

The federal government requires more stringent regulations for providing fresh air, sunlight and outdoor exercise to livestock and test animals than Colorado has given human beings in its prisons.

“It amounts to its own kind of torture,” says Robertson of the Denver-based Civil Rights Education and Enforcement Center (CREEC).

The legal battle started in 2010 when inmate Troy Anderson sued the state over mental health care at Colorado State Penitentiary (CSP), the state’s 23-year-old supermax prison in Cañon City. Among other complaints, Anderson said it was a breach of his civil rights to have been housed there for 12 years virtually without open air.

In 2012, the federal judge presiding over the lawsuit granted Anderson the right to “outdoor exercise in an area that is fully outside” including “sunlight, rain, snow and wind” three days a week unless weather or disciplinary measures precluded it.

But rather than give Anderson an outdoor exercise area at CSP, state corrections officials instead transferred him to the Sterling Correctional Facility 60 days after the judge’s ruling.

Anderson has told The Independent he had mixed feelings about his legal victories because prisoners at CSP still had no outdoor access.

“I didn’t set out to do this just for myself,” he wrote.

So the team of lawyers who had represented Anderson filed a class-action lawsuit on behalf the CSP prisoners who still weren’t allowed outside.

As the case meandered through federal court, the Corrections Department was making changes to reduce the number of inmates it houses in “administrative segregation” — its term for solitary confinement. The state replaced its practice of housing most CSP inmates alone in their cells 23 hours a day (with the 24th in the exercise room) with a tiered system in which most inmates are given four hours outside their cell in a group of eight. The groups are designed to help them grow accustomed to human interaction.

To accommodate those groups, the Corrections Department in 2014 asked the legislature for $4.7 million to build new outdoor exercise yards at CSP where inmates will have room to run, play basketball, walk or just sit on a bench.

The approximately 171 inmates still living under tighter, 24-hours-a-day solitary confinement conditions have been moved to Sterling, where they can exercise in newly built, individually sized outdoor cages called “modules.” Under the DOC’s new policies, those prisoners will be limited to solitary confinement conditions for 12 months, at the most – not stuck for years on end, as Anderson was.

A few months before the case was scheduled for trial last November, the state asked for mediation. It struck a deal with the plaintiffs, requiring CSP’s new outdoor exercise areas to be complete by the end of this year and ensuring that high-security inmates at both CSP and Sterling would have access to outdoor exercise. The assurance of open air applies not just to current inmates, but also those in the future. The settlement provides a way for enforce the agreement if the state goes back on its word. And it gives $410,000 in attorney’s fees to the lawyers who filed the lawsuit.

U.S. Judge William Martinez finalized the agreement Wednesday.

Said DOC spokeswoman Laurie Kilpatrick: “The Department of Corrections worked hard to develop, purpose and implement a solid settlement agreement that addresses the issues of outdoor recreation for both our offenders who are now housed within Extended Restrictive Housing, as well as for the close custody offender population now at CSP.”

Robertson agrees with Kilpatrick, but has a decidedly more touchy-feely response to the agreement.

“Because of this settlement, inmates will get to feel the sun and wind on their faces. … They’ll be able to experience things like rain and snow,” she said. “After all, as one of the plaintiffs told the judge, who doesn’t want to be outside?”