A lawsuit challenging Virginia’s automatic use of solitary confinement for death row inmates is on track after a federal judge refused the state’s request for dismissal. It is good this issue will get the hearing it demands. Even better would be for the state to take to heart the judge’s admonition about “changing moral and legal standards” and voluntarily end a practice that is unnecessarily punitive and of questionable efficacy.

“I do not understand why the commonwealth is insisting on maintaining this level of these conditions,” District Judge Leonie Brinkema said in urging Virginia officials to “give some serious thought to trying to work this case out.” The suit brought by four death row inmates claims that isolation in small cells with no human contact for “nearly every hour of every day” violates the constitutional prohibition against cruel and unusual punishment. Judge Brinkema had previously ruled automatic solitary confinement unconstitutional, but the case turned on the issue of due process and the ruling was overturned by the U.S. Court of Appeals for the 4th Circuit.

Legal precedents may well be on the state’s side. But growing evidence about the harmful effects of long periods of solitary confinement and questions about its costs and usefulness should prompt state officials to rethink the practice. A group of former corrections officers argued in another case that solitary is actually counterproductive to institutional safety.

Gov. Terry McAuliffe should order a review of the practice and give reasonable treatment to those on death row.