Mr Omar has since been accused of being part of a massive plot that killed more than 70 people in Kampala last July.
But the London court said Mr Omar's trial was not a matter the British courts could intervene in.
Lawyers for Mr Omar had wanted the High Court to force the British government to reveal details of alleged interrogations last autumn. They say the interrogations prove that their client no involvement in the July 2010 attacks.
The attacks in Kampala killed more than 70 as people gathered to watch the football World Cup final. The bombings were blamed on Somalia's al-Shabab militants.
End QuoteHis trial is his punishment for failing to co-operate and he has now been left to his fate”
In his witness statement to the British courts, he says he was questioned at least 20 times, mostly by British and US security service officers who hit him and stamped on his feet.
If true, these incidents occurred after the UK government published rules designed to prevent security service personnel becoming involved in torture and ill-treatment.
Ben Jaffey, for Mr Omar, told the High Court that the Western intelligence officers had offered him a deal to become an informant. They asked him about various British suspects in East Africa and asked him to become an agent.
"His trial is his punishment for failing to co-operate and he has now been left to his fate," said Mr Jaffey.
Counsel for the British government have neither confirmed nor denied that the security services interviewed Mr Omar, a standard legal position adopted in the early stages of some national security cases.
But James Eadie QC, for the British government, said that it was clear that Mr Omar's trial had nothing to do with his alleged interrogation because the suspect said he had made no admissions relating to the Kampala attacks.
"There is thus no connection whatsoever, even on his own case, between any ill-treatment and any issued in the criminal proceedings," he said.
Ruling against Mr Omar, Mr Justice Collins said that his case was "unarguable" and that his claim of being unlawfully arrested and detained could be taken up against both the Kenyan and Ugandan authorities.
However, he said he would delay making his order final in case fresh evidence emerged at the start of the trial which raised new questions about the UK's alleged involvement in his treatment.