Diplomatic assurances between the government and Libya to guarantee the human rights of deportees have been discredited by senior judges.
The Special Immigration Appeals Commission (SIAC) has ruled two Libyan terror suspects, known only as DD and AS, cannot be deported to Libya.
It found that although they pose a national security risk to the UK, their human rights could be breached by Libya and they would likely not receive a fair trial.
The Home Office said it is "very disappointed" with the SIAC's decision and plans to appeal.
It is a setback to the government's Memorandum of Understanding (MoA) with Libya. In 2005, Colonel Gaddafi promised the government anyone deported from the UK would not be mistreated.
Similar MoAs were agreed with Jordan and Lebanon but human rights groups were highly critical of the agreements at the time. Now the SIAC has indicated the MoAs are meaningless, after Mr Justice Ousely, chairman of SIAC, said the two men faced a real risk of mistreatment.
A Home Office spokesperson insisted the assurances given by the Libyans do provide effective safeguards for the deportees' proper treatment and ensure their human rights will not be breached if they are returned.
Liberty has welcomed the ruling, claiming that the two men faced possible torture despite diplomatic assurances.
Director of Liberty Shami Chakrabarti said: "If deportation is to be one part of Britain's anti-terror strategy our government must work to improve the human rights standards of friendly countries rather than dilute ours.
"The government should concentrate on eradicating the practice of torture, not extracting incredible paper promises."
Despite the ruling, the Home Office confirmed it has no plans to review its policies.
The spokesperson continued: "We firmly believe that our policy of seeking assurances from other countries in respect of those considered to pose a threat to national security strikes the right balance between safeguarding their rights and enabling us to protect the British public and SIAC has accepted this previously."
However, the Liberal Democrats called on the government to strengthen its deportation process, arguing people who do pose a threat to the UK must be deported but not in a way that compromises the UK's moral or legal obligations under human rights law.
Home affairs spokesman Nick Clegg said: "We must make serious efforts to involve the UN in arrangements for effective post-deportation monitoring, and negotiate to find third countries to which people can be deported.
"This decision must not be an excuse to lazily pretend that there is a trade-off between human rights and the fight against terrorism."