A British court says a former Libyan military commander can sue the U.K. government for its alleged role in his detention and rendition.

Abdel Hakim Belhaj was arrested in 2004 in Bangkok along with his wife and returned to Moammar Gadhafi's Libya, where he spent years in prison.

He is attempting to sue the British government, former Foreign Secretary Jack Straw and the former head of spy agency MI6 for alleged complicity with American intelligence over his treatment.

Last year the High Court threw out the claim, saying it was not a matter for the British courts.

But on Thursday the Court of Appeal said the "particularly grave" allegations meant the case could be heard.

The government denies complicity in rendition or torture and is appealing to the Supreme Court.