ALEXANDRIA, Va. (AP) — A federal judge in Virginia has found that treatment of inmates on Virginia's death row inmates was unconstitutional before recent changes and barred the state from reverting to the old policies.

In 2015, the state reformed its treatment of death row inmates, but refused to commit to making those changes permanent.

The Washington Post reports that a ruling this week from Judge Leonie M. Brinkema ordered the state to keep the changes in place.

Brinkema wrote that the years-long isolation under the old conditions created a "significant risk of substantial psychological and emotional harm."

Under the old policies, prisoners slated for execution spent about 23 hours a day alone in a 71-square-foot cell, could see visitors only through a plexiglass wall and were barred from recreational facilities used by other inmates.