Correction: An earlier version of this editorial incorrectly characterized the conditions of Reginald Latson’s confinement, saying that he is isolated from other prisoners in a cell that lacked a proper bed and toilet. While that was true for a time when Mr. Latson was held at a regional facility, he is currently incarcerated in the Marion Correctional Treatment Center, run by Virginia’s Department of Corrections, where he has a bed and toilet and is permitted to mingle with other inmates for some hours daily. The following version has been updated.

FOR THE apparent crime of wearing a hoodie in public, an 18-year-old black man was approached by a sheriff’s deputy in Stafford County four and a half years ago. A caller had reported that the man, sitting on the grass across the street from an elementary school, might be armed. As it turned out, the suspicion was unfounded; the man, Reginald Latson, who has an IQ of 69, was doing nothing more than waiting for a public library to open its doors.

Yet that unprovoked encounter between the deputy and the teenager, which culminated in the teenager’s arrest and felony conviction for assaulting the deputy, triggered a tragic sequence of events. As The Post’s Ruth Marcus has detailed in two op-ed columns, the story of Mr. Latson is a case study of how ill-equipped the criminal justice system is to handle people with mental, developmental and emotional disabilities.

Specialists who have examined Mr. Latson describe him as a boy in a man’s body, given to violent impulses and outbursts. State officials concluded last year that he belongs in a secure therapeutic treatment center, not a prison. They arranged for just such a placement, at a facility in Florida, and a judge signed on to that plan.

But a prosecutor in Stafford County, Eric Olsen, has pressed ahead to keep Mr. Latson in prison rather than at an equally secure facility where he could receive appropriate treatment. Last spring he brought a fresh assault charge after Mr. Latson punched a prison guard — the sort of incident that is sometimes treated as a disciplinary matter in prison, not a new criminal offense.

The effect has been to prolong a toxic cycle of incarceration, violent outbursts and criminal charges. All this for a young man whose problems would be better managed outside the prison system at a secure treatment facility.

No one is suggesting Mr. Latson should go free. But it seems clear that punishment — he has been segregated for long periods from other inmates, deprived of TV, radio, books and magazines and, at various times, Tasered (after punching the guard) and straight-jacketed into a chair — is doing no good. Since his arrest in 2010, Mr. Latson has cycled through 10 or so facilities in Virginia, including jails, prisons, group homes and psychiatric hospitals. He has had recurrent suicidal urges and has lost 40 pounds from an already-lean frame.

Yet as long as Mr. Latson faces pending charges, he cannot be transferred to the treatment facility in Florida.

Given Mr. Olsen’s insistence on further criminal charges, it appears that this senseless cycle can be broken at this point only by a guilty plea or conviction at a new trial for Mr. Latson, which is scheduled for next month. Once that happens, the judge could see that Mr. Latson is moved to the treatment facility after serving a mandatory minimum sentence in Virginia, or Gov. Terry McAuliffe (D) could immediately grant a pardon conditioned on Mr. Latson’s transfer to the facility in Florida. It’s not too late for Virginia to get its act together and recognize the distinction between disability and criminality.