Norwegian mass murderer Anders Behring Breivik has won part of a human rights case against the Norwegian state.
Breivik, a right-wing extremist, killed dozens of young centre-left political activists in an attack on the island of Utoya in July 2011.
Earlier that day, he set off a car bomb in the capital, Oslo, killing eight people.
The court has upheld his claim that some of his treatment amounted to "inhuman or degrading treatment or punishment".
After the judgement, Breivik's lawyer Oystein Storrvik called for his solitary confinement to be repealed.
In her ruling, judge Helen Andenaes Sekulic said the right not to be subjected to inhuman treatment represented "a fundamental value in a democratic society" and also applied to "terrorists and killers".
Breivik had challenged the government over his solitary confinement, which saw him kept alone in his cell for 22 to 23 hours a day, denied contact with other inmates and only communicating with prison staff through a thick glass barrier.
His prison regime deviated so markedly from that enforced upon any other prisoner in Norway, regardless of the severity of their crimes, that it had to be considered an extra punishment, the judge said.
However, article three of the European Convention on Human Rights (ECHR) required that prisoners be detained in conditions that did not exceed the unavoidable level of suffering inherent in detention, given the practical requirements of the particular case, she said.
The prison authorities had also not done enough to counteract the damage he had suffered from being in isolation, she said.
Judge Sekulic also noted that Breivik had been woken up every half hour at night over a long period of time and on some occasions subjected to strip searches with female officers present, which he found particularly difficult.
"Taken together with the other stringent restrictions which he was subject, this was regarded as degrading treatment in the Convention sense," said the judge, Norwegian broadcaster NRK reported.
'Facilitate a community'
State lawyer Marius Emberland said the government was surprised by the verdict but had not decided whether to appeal.
If neither side appeals against the judgement within four weeks, the prison is obliged to make Breivik's prison regime more lenient in line with the judge's remarks, NRK reported.
The prison must work to bring in other prisoners and "facilitate a community", the judge said.
However, the judge ruled that strict controls on Breivik's correspondence were justified and his right to a private and family life under article eight of the ECHR had not been violated.
The court also ordered the Norwegian state to pay Breivik's legal costs of 330,000 kroner (NZD$71,805).
Bjorn Ihler, a survivor of Breivik's massacre of young activists on Utoya, tweeted that the judgement in Breivik's favour showed Norway had a "working court system, respecting human rights even under extreme conditions".