The government has fought off a case which could have revealed if British security officers were involved in alleged renditions in East Africa.
The men asked senior judges to force the government to disclose what British agencies know about their treatment.
The High Court rejected the challenge but didn't say whether British officers had been involved in the case.
The decision by the High Court is a boost for the government's attempts to protect its policy of neither confirming nor denying the activities of British security officials abroad.
The ruling also unusually involved the court going into a special secret session to debate national security evidence - a procedure ministers controversially want to expand.
In July 2010, bombs in Kampala killed 76 people watching a World Cup football match. The attacks were blamed on al-Shabaab, the armed Islamist group in Somalia.
Both Scotland Yard and MI5 have been investigating Islamist terrorism in East Africa and the threat posed by recruits from the UK.
The three men at the centre of the case, Omar Awadh Omar, Habib Sulieman Njoroge and Yahya Suleiman Mbuthia, were all arrested as part of the investigation into the bombings. They say they were illegally taken from Kenya to Uganda and have been brutally treated in detention. They could face the death penalty if convicted.
A British connection?
Lawyers for Mr Omar and Mr Njoroge say that they were separately interrogated by people they believed to be British - and that those people must have known how they were being treated.
- Salva Kiir sacks top South Sudan officials
- Lawyer wants Chinedu to appear in court
- Maji marefu’s futile effort to find stolen property
- Can chickens really be cleverer than a toddler? Studies suggest animals can master numeracy and basic engineering
- Freedom of media under threat in Eastern Africa
- Rapid desertification in Kenya threatening livelihood