HATTIESBURG, Miss. — The prisoner spent a fitful August night trying to tune out the howls and moans of inmates in adjoining cells. He did not stir from his thin sleep mat until well after 1 p.m. A breakfast of cold grits waited in a slot in the reinforced steel door.

It was a day like many others he had spent at the Forrest County Jail for much of the past two years — awaiting trial on armed robbery charges, but held in a cell alone for more than 23 hours each day.

The prisoner, Ke’jorium McKnight, is 16 years old. He was kept in solitary confinement not for behavioral reasons or as punishment but because he is being tried as an adult. Under Mississippi law, that means he must be held in an adult jail. And federal law requires that if he is held in an adult jail, he must be kept separate from other inmates, for his own protection.

“I’m always feeling down,” he said in a brief interview at the jail on Aug. 6. “I’m in extreme isolation, and I don’t understand why they would do this to me.”