Shabana Mahmood and David Lammy have been found to have breached a prohibition on inhuman or degrading treatment with respect to a prisoner who spent months segregated from other inmates, in what is believed to be a legal first.
Sahayb Abu was confined to his cell at HMP Woodhill in Milton Keynes, for 22 hours a day and prevented from associating with other prisoners for more than four months after Hashem Abedi, the brother of the Manchester Arena bomber, allegedly attacked prison officers at HMP Frankland.
Abu, a convicted terrorist serving a life sentence, was already being held in a separation centre for prisoners believed to be at risk or radicalising others, which has also been described as small group isolation, but was moved to even more restrictive conditions following the attack by Abedi in April.
In what is believed to the the first instance of ministers being found in breach of article 3 of the European convention on human rights, Mr Justice Sheldon found that Lammy, the justice secretary, and Mahmood, his predecessor, should have considered Abu's existing mental health issues before he was moved.
In his written judgment, the judge said: "In the context of a prisoner who has a history of trauma and where there was a failure to obtain an assessment of his needs even though he was known to have mental health issues, and a failure to provide him with any therapeutic treatment to address his trauma, a contravention of article 3 is made out, notwithstanding the importance of the aim behind the segregation regime.
"The suffering that the claimant has experienced goes way beyond the inevitable element of suffering that is connected with segregation: an otherwise legitimate form of treatment. An individual who is segregated from others and deprived of the usual activities available to prisoners (education, work, communal prayer) will inevitably suffer isolation and an element of distress and anxiety. What the claimant experienced was much more severe than that: he is suffering from post-traumatic stress disorder, brought on (at least in part) by the segregation."
He said that his judgment did not mean that the same segregation regime would contravene article 3 in the case of a prisoner with an ordinary level of resilience, but the "claimant was not such a prisoner, given his history of trauma and associated mental health needs".
The judge said he would consider whether damages were necessary at a later date.
In a witness statement, Abu said he suffered "paranoia and flashbacks" in the separation system, and in segregation "[my] mental health has deteriorated to the point that I am experiencing constant thoughts of suicide and self-harm".
Separation centres, which currently house 12 prisoners, according to the judgment, have come under increased scrutiny this year.
In another judgment, handed down in January, the high court found that the decision to place Denny De Silva, who was serving a life sentence for a gangland murder, in a separation centre was unlawful as it had relied on allegations of radicalisation activities in prison by De Silva, without establishing whether or not they were true. In comments that were also referred to in the Abu case, Mrs Justice Hill said: "Research indicates that small group isolation regimes can produce serious and adverse psychological effects similar to solitary confinement."
Earlier this month, an independent commission set up by the Bingham Centre for the Rule of Law said there was "limited research evidence and evaluation of the effectiveness of separation centres".