A Maine State Prison “Supermax” inmate whose commitment to the state’s chief mental hospital was challenged by the Corrections Department finally is being treated there, after a judge for the second time ordered him to the Riverview Psychiatric Center, in Augusta.

In June of last year, a Knox County jury found Michael James, 24, not criminally responsible by reason of insanity for 10 assaults on prison guards, and Superior Court Justice Donald Marden committed him to Riverview, as required by law. But Corrections, following the advice of the Attorney General’s office, refused to transfer him, arguing that James should have to complete the remaining 10 years of his sentence for robbery before getting treatment.

After complex and drawn-out legal proceedings, Marden disagreed, ordering on July 18 that James be sent to the hospital immediately. This time, Corrections complied. In his decision, Marden wrote that the public (represented by the prison staff) needed to be protected from James, who had spent most of his childhood in mental institutions.

But Corrections got something, too: James’s time in the hospital will not count against his sentence — because, Marden wrote, mental-hospital commitment does not constitute punishment.

Lawyers for both sides are unhappy with what they didn’t get. Both plan appeals to the Maine Supreme Judicial Court.

But James is happy. He feels he is now getting the treatment he needs.

“It’s great here,” he said in a private interview in a conference room in Riverview’s forensics unit.

He said the “respectful” treatment by hospital staff is the “total opposite” of what he suffered in the harsh solitary confinement of the Supermax (or Special Management Unit), where he had been for years.

The guards “tortured me there,” he said, adding that he got “zero” mental-health treatment in prison, even in the maximum-security Supermax’s psychiatric wing.

James took off his baseball cap to reveal, literally, the scars of his prison life: deep gouges on his skull that he said were a month or so old. He had cut himself with the edge of a table “to relieve the stress,” he said, from altercations with guards.

It is “nice and quiet” in the hospital, he said. He has his own room, watches television in one of three common rooms, mixes with other clients, makes and receives phone calls, sees family and friends during visiting hours, has signed up for classes, attends self-help groups, and goes to a gym.

In less than two weeks since his admission, his good behavior has allowed him to progress through several levels of expanded privileges.

Even in the court papers, the state did not reveal why it fought — and still is fighting — so hard to keep James at the prison.

Joseph Steinberger, one of James’s lawyers, has an explanation: “Everyone is very aware of the danger that people at the prison could commit crimes” in order to be sent to Riverview. “Clearly this is the fear the state has. But general-population prisoners are not likely to prefer Riverview, just the guys whose mental illness is being treated at the prison by punishment with solitary confinement.”

He added: “If this case puts pressure on the prison to treat mentally ill prisoners more humanely, that is a good thing.”

State officials continue to decline comment on developments in James’s case, except to announce the appeal.

SUBVERSIVE SUMMER | June 18, 2014 Prisons, pot festivals, and Orgonon: Here are some different views of summertime Maine — seen through my personal political lens.

LEFT-RIGHT CONVERGENCE - REALLY? | June 06, 2014 “Unstoppable: A Gathering on Left-Right Convergence,” sponsored by consumer advocate Ralph Nader, featured 26 prominent liberal and conservative leaders discussing issues on which they shared positions. One was the minimum wage.

STATE OF POLARIZATION | April 30, 2014 As the campaign season begins, leading the charge on one side is a rural- and northern-Maine-based Trickle-Down Tea Party governor who sees government’s chief role as helping the rich (which he says indirectly helps working people), while he vetoes every bill in sight directly helping the poor and the struggling middle class, including Medicaid expansion, the issue that most occupied the Legislature this year and last.

MICHAEL JAMES SENT BACK TO PRISON | April 16, 2014 The hearing’s topic was whether James’s “antisocial personality disorder” was enough of a mental disease to keep him from being sent to prison.