Some aspects of the government's control orders detaining terror suspects do breach human rights, the Law Lords ruled today.
However, the UK's highest court ruled the controversial orders could remain with some alteration.
The Law Lords ruled 18-hour home curfews imposed against some suspects were tantamount to solitary confinement and breached suspects' right to liberty.
They recommended a maximum 16-hour curfew be imposed instead.
The five-strong panel also said the procedures surrounding control orders should be made fairer to bring them inline with civil trials. The Law Lords ruled control orders are not criminal penalties so will not be subject to the stricter procedures of a criminal trial.
No existing orders will be affected by the ruling as the government has already modified conditions after losing a previous Court of Appeal case.
The High Court will now review specific cases.
Home secretary Jacqui Smith said she was pleased the Law Lords had upheld the control orders regime, as well as judging no existing control orders need be weakened.
Ms Smith said she was "disappointed" the panel had found against orders containing 18-hour curfews, but said she would now consider imposing 16-hour curfews.
The home secretary maintains extensive curfews are required to protect national security.
She added: "I will continue to take every available step necessary to protect the public from the very real threat we face from terrorism."
The Conservatives said they recognised the predicament facing the government but called for a review of the handling of control orders.
Shadow home secretary David Davis said ministers must come to parliament to make their argument if the terror situation is so grave the Human Rights Act must be derogated.
The Liberal Democrats maintain their opposition to control orders as wrong in principle and flawed in practice.
Home affairs spokesman Nick Clegg said today's ruling would only curb the "very worst excesses" of control orders.
Mr Clegg said: "How can it be right to impose what amounts to home detention without giving suspects any evidence for such a measure and then have almost half of those subject to control orders abscond altogether?"
The Home Office asked the Law Lords to review control orders after the High Court and Court of Appeal ruled they breach suspects right to Liberty.
The orders replaced indefinite detention without charge, which the House of Lords found breached human rights