In a blow to the government’s anti-terror measures, the House of Lords ruled by an eight to one majority in favour of appeals by nine detainees.
The law lords said the measures were incompatible with European human rights laws. The men will stay behind bars while ministers decide how to react.
Solicitor Gareth Peirce called on the government to release them quickly.
Most of the men are being indefinitely held in Belmarsh prison, south London.