William Hague has lifted the lid on British spying, saying secret agents "risk" or "lose" their lives as part of their work.
In a rare speech by a foreign secretary about the intelligence services' work, Hague said "lives and critical national interests are at stake" in security work.
And he said intelligence services are vital to combating terrorism and were a "resource that inform the making of foreign policy."
But Hague also said it was important for security services to acknowledge controversies, such allegations M15 and M16 had been complicit in extraordinary rendition of terror suspects.
"The very making of these allegations undermined Britain’s standing in the world as a country that upholds international law and abhors torture. Torture is unacceptable in any circumstances. It is abhorrent, it is wrong, and Britain will never condone it."
Hague promised new guidelines and the government's forthcoming Justice and Security Green Paper would help address the controversy over the allegations, which he acknowledged had "contributed to a lack of public trust and damaged our relations overseas".
"Our proposals are intended to ensure that the mainstream civil court system is equipped to hear national security cases where disclosure of material would be damaging to the public interest.
"Central to this is the proposed introduction of legislation to make the mechanism known as closed material procedures – already used elsewhere in the UK court system - available in the full range of civil proceedings.
"This system enables relevant but sensitive material in a case which damage national security if exposed to be considered privately by the judges and a special advocate, appointed to represent the other party’s interests. This would only be used in exceptional instances where it is critical to the case. "