Owen Bowcott, Legal Affairs Correspondent
The Ministry of Defence has been condemned by the high court for stifling legal challenges over the treatment of detainees in Iraq and Afghanistan.
In a strongly-worded judgment, the former defence secretary Bob Ainsworth was accused of lobbying behind closed doors to avoid embarrassing court decisions in a way that was damaging and "frankly inimical to the rule of law".
Overturning restrictions on access to legal aid, Lord Justice Laws and Mr Justice Stadlen declared that cutting off funding for public interest cases about allegations of UK involvement in torture was unlawful.
The judgment drew attention to a letter sent by Ainsworth in November 2008 to Lord Bach, then at the Ministry of Justice, which urged a review of the funding of judicial reviews.
"The MoD has been faced with a series of judicial review applications arising out of the intervention in Iraq," Ainsworth wrote. "In most of these cases the consequences of an adverse judgment would be extremely serious for our defence, security and foreign policy interests."
One case at the time related to the treatment of detainees handed over to the Afghan authorities. "This decision leads me to wonder whether the time is right for a look at the rules under which [the Legal Services Commission] makes its decisions in judicial review cases."
The letter, the judges said, asserted that "the consequences of an adverse result" were a "good reason for the denial of public funding to bring the case". But, the judgment continued, "by law such a position is not open to government".
The judges added: "For the state to inhibit litigation by the denial of legal aid because the court's judgment might be unwelcome or apparently damaging would constitute an attempt to influence the incidence of judicial decisions in the interest of government. It would therefore be frankly inimical to the rule of law."
The case was brought by Maya Evans, a human rights activist who has fought a legally-aided action on behalf of alleged victims of torture. She has accused the MoD of wanting to stop "politically inconvenient cases".
Commenting on the decision, Evans said: "In my previous case I had the opportunity to shine a light into the dark recesses of the UK's torture policy in Afghanistan, to the benefit of hundreds of prisoners and, ultimately, the British public.
"I am thrilled that similar opportunities are now preserved for future concerned citizens as a result of this victory."
Daniel Carey, of Public Interest Lawyers, who represented Evans, said: "These cuts to legal aid never were about saving money. They were about the government's attempts to avoid accountability by cutting off litigation at its source. The court's outright rejection of this is a significant victory for the rule of law."
Phil Shiner, the head of Public Interest Lawyers, said: "A senior court of appeal judge has made clear that the MoD's behaviour in persuading the Ministry of Justice to change the rules secretly was an outrage to the rule of law.
"The courts will not tolerate such covert dishonesty and the MoD must now face the consequences of what it sanctioned in Iraq and Afghanistan."
Lord Bach, who was recorded in one of the documents in 2009 as being "supportive of the concerns raised by Bob Ainsworth", has since emerged as an opponent of the government's plans to cut legal aid.
In a statement issued by the Sounds Off For Justice campaign, Bach declared last month: "Access to justice must be a cornerstone of our democracy. The law should not be only for the very wealthy or large organisations, but is also for the poor and those who aren't well off."