A man convicted of serious terrorism offences in the UK who claimed the UK was complicit in his torture in Pakistan has lost his appeal.
Rangzieb Ahmed, 34, from Greater Manchester, was convicted of membership of al-Qaeda and directing terrorism in December 2008.
He alleged he was unlawfully held and beaten, and his conviction should be quashed because the UK was complicit.
But his conviction was declared safe by three judges at the Court of Appeal.
Lord Justice Hughes, Mr Justice Owen and Mrs Justice Thirlwall made the ruling at the court in London.
A second man, Lancashire-born Habib Ahmed, who was sentenced to a total of 10 years in prison - nine for being a member of the terror group and an additional one year for possessing a document for terror-related purposes - also had his conviction appeal dismissed.
Rangzieb Ahmed, from Rochdale, was jailed for life in Manchester in 2008 after a lengthy investigation into a network of Islamists stretching from Manchester to Pakistan.
He was accused of playing a crucial role in linking British al-Qaeda sympathisers with commanders overseas. But prior to his return to the UK to face trial, he was held for more than a year in Pakistan.
During the appeal hearing in 2010, Rangzieb Ahmed's QC, Joel Bennathan, claimed he was beaten and had three of his fingernails pulled out with pliers over the course of three days - and that the UK was "complicit" in acts of torture.
He argued that the trial judge should have halted the proceedings against him as an abuse of process.
But rejecting Rangzieb Ahmed's appeal on Friday, Lord Justice Hughes said the result of a pre-trial inquiry by the trial judge "was that torture had not been demonstrated to have occurred, and had been demonstrated not to have occurred before the sole occasion when Rangzieb said he had been seen by British officers".
Lord Justice Hughes said the trial judge had "expressly rejected the suggestion of outsourcing torture by British authorities".
The trial judge had found "simply no evidence that they had assisted or encouraged the Pakistani detainers to detain him unlawfully or to ill-treat him in any way, whether amounting to torture or not", he said.
The appeal judges ruled that the trial judge "was right to refuse to stay the prosecution against Rangzieb".
Lord Justice Hughes went on to say: "Torture is wrong. If it had occurred there could be no excuse for it, not even if Rangzieb was a suspected terrorist who might kill people.
"But the question was not whether it is wrong, but what consequences flow from it if it occurred."
He said the court was "satisfied that the necessary connection exists where the torture has an impact on the trial, but not otherwise".
He said: "Even if there had been torture whilst Rangzieb was in Pakistan, it had no bearing on the trial and there was no reason why the question of whether or not he was guilty of an antecedent crime in England should not be decided according to law."
They rejected all grounds of appeal in the cases of both men, who are not related, ruling that "these convictions by the jury are safe".
The judges refused Rangzieb Ahmed permission to appeal to the Supreme Court, but certified two questions of law of general public importance - which means that his lawyers can apply to the highest court in the land in a bid to take the case further.
In a statement, Chief Superintendent Tony Porter, head of the North West Counter-Terrorism Unit, said: "Following the appeals lodged by Rangzieb and Habib after their convictions, there was a lot of speculation and criticism of how we handled the investigation, and in particular about an abuse of process and torture.
"Today, I am pleased the Court of Appeal has dismissed all those claims and upheld the trial judge's findings."
He went on to say the North West Counter-Terrorism Unit did not "participate in, solicit, encourage or condone the use of torture or inhumane or degrading treatment".
"For reasons both ethical and legal, their policy is not to carry out any action which they know would result in torture or inhuman or degrading treatment and the Court of Appeal has recognised that.
"The principles we follow are that we always seek to act within the boundaries of the law and do not intentionally take any actions which could undermine any legal process. Today the Court of Appeal has also recognised that," he said.