Tanvir Hussain was one of three men convicted of a plot to launch suicide attacks on flights from Heathrow to America

Algerian terrorist Kamel Bourgass was convicted of plotting attacks in the UK using poisons, including ricin and cyanide, and bombs, as well as murdering a police officer, Special Branch detective constable Stephen Oake, in Manchester in 2003.

Two high-profile terrorist prisoners who were segregated for extended periods have won challenges at the UK's highest court.

In March 2012 the pair failed to persuade appeal judges that their treatment was unlawful.

They were alleged to have intimidated and bullied other inmates over matters of faith, and authorities in their respective jails had considered it was necessary to separate them from other prisoners ''for good order and discipline''.

Both men denied accusations that they tried to influence and dictate the beliefs of other prisoners.

The Supreme Court unanimously ruled today that their segregation was not lawful after initial periods of 72 hours.

The judges granted declarations in each case that the "appellant's segregation beyond the initial period of 72 hours was not authorised, so was unlawful".

The pair had also raised human rights issues - they claimed their rights had been violated - but that aspect of their case was rejected by the Supreme Court.

Bourgass, an Algerian, is serving 17 years for conspiracy to commit public nuisance by using poisons or explosives in relation to the 2002 Ricin terrorist plot.

He is also serving a life sentence for murdering Detective Constable Stephen Oake, 40, with a kitchen knife during his 2003 arrest at a flat in Manchester.

He injured four other officers during that attack and is serving sentences for attempted murder of two officers and wounding a third.

Hussain was one of three men convicted of a plot to launch suicide attacks on flights from Heathrow to America and Canada using liquid bombs made of hydrogen peroxide hidden in soft drink bottles. He is serving life with a minimum tariff of 32 years.

While detained at HMP Whitemoor in Cambridgeshire, Bourgass was segregated from March 10 2010 until April 22 and again from April 23 until October or November of that year.

Hussain was segregated at HMP Frankland in County Durham from April 24 2010 until October 2010.

Lord Reed, who heard the case with Supreme Court president Lord Neuberger, deputy president Lady Hale and Lords Sumption and Hodge, said one of the issues before the court was whether the solitary confinement was "authorised as required by the applicable legislation".

He said: "I have concluded that it was not."

Prison rules enable a governor to arrange for a prisoner to be segregated, but not for more than 72 hours "without the authority of the Secretary of State".

The Supreme Court concluded that the men's segregation beyond the initial period of 72 hours "was not authorised by the Secretary of State and was accordingly unlawful".

Their appeal was allowed on that basis.

Describing the conditions in which each man was kept in solitary confinement, Lord Reed said Bourgass was locked in his cell for 23 hours a day and was denied association with other prisoners.

"He was allowed out of his cell for exercise, which he took alone in a caged area. He was unable to participate in activities which involved association with other prisoners, such as work, education and communal religious services.

"Prisoners in segregation could however have access to education courses in their cells.

"He was permitted visits, but not physical contact with visitors until that restriction was lifted during July 2010. He saw a member of the chaplaincy from time to time. He also saw members of staff of the segregation unit when they opened the door to his cell at mealtimes."

Lord Reed said Bourgass was permitted books and a radio "and also had the opportunity to have a television if he displayed consistently good behaviour and a good attitude".

The conditions in which Hussain was kept in segregation were "broadly similar to those that applied to Bourgass".

"He was only able to make a telephone call once every three days, as there were fewer telephones available than on normal location," said the judge.

"As there was no electricity in the cells in the segregation unit, he did not have a television. Hussain also claimed to have been denied exercise on some occasions".

Lord Reed said that a prisoner's right to make representations about segregation was "largely valueless unless he knows the substance of the case being advanced in sufficient detail to enable him to respond", and he "must normally be informed of the substance of the matters on the basis of which the authority of the Secretary of State is sought".

It was "important to understand that what is required is genuine and meaningful disclosure of the reasons why authorisation is sought".

The judge added: "The reasons for continued segregation which were provided by the prison staff involved in the present cases gave, at best, only the most general idea of the nature of their concerns, and of why those concerns were held.

"More could and should have been said - and was said in the witness statements filed in these proceedings - without endangering the legitimate interests which the prison authorities were concerned to protect."

He said: "The imposition of prolonged periods of solitary confinement on the basis of what are, in substance, secret and unchallengeable allegations is, or should be, unacceptable."