DEEP IN THE HEART of Virginia coal country sits a mountaintop prison, its remote location an outward expression of the plight of the inhabitants inside. Some 500 of its 745 inmates are held in solitary confinement — 23 hours a day, seven days a week, some for years — with virtually no human contact or meaningful stimulation. Prison officials estimate that 173 of those in solitary suffer from mental illness. Whether the illness was induced by isolation is not known; what is beyond dispute is that isolation exacerbates the problem.

This is Red Onion State Prison, as described by The Post’s Anita Kumar. Virginia is one of 44 states that enlist solitary confinement as a way to manage some of its prisoners. Virginia officials estimate that as of this fall roughly 1,800 inmates were kept in isolation, comprising a large chunk of the 25,000 or so prisoners nationwide who find themselves in these conditions every day. Prisoners at Red Onion have been kept in solitary confinement from two weeks to seven years, according to Ms. Kumar’s report, with an average length of stay in segregation of 2.7 years.

Virginia officials say that they rely on solitary confinement to manage inmates who are unable to control their rage or who have assaulted corrections officers or other prisoners. Sometimes, they say, a prisoner is placed in a special segregation unit — about the size of a doctor’s exam room — for his own good to avoid being injured by others. Security and safety in a prison must be a top priority, and strategic and limited use of solitary confinement may at time be a necessary tool. But routine reliance on prolonged solitary confinement should never be the default.

Short-term isolation is unlikely to cause serious harm. But prolonged solitary confinement can lead to devastating consequences, including psychosis, reduced brain function, debilitating depression and increased rates of suicide.

Del. Patrick A. Hope (D-Arlington) and Sen. Adam P. Ebbin (D-Alexandria) are among a group of Virginia lawmakers that have taken notice of the state’s outsized reliance on isolation and have pledged to spur the newly convened General Assembly to study the problem to ensure limited use and the availability of mental health treatment for inmates before they are released into the community. The federal government also has a role to play, and the Justice Department should take up the request by the Legal Aid Justice Center, which represents 12 Virginia inmates who have been held in prolonged isolation, to investigate Virginia’s practices.

Other states, including New York and Texas, have moved in the right direction and begun to reduce their reliance on solitary confinement. Virginia should follow suit.