Ahmed Samsam sued the Danish Security and Intelligence Service (PET) and the Danish military intelligence service (FE), asking them to recognise him as a secret agent.

The lawsuit was part of his efforts to overturn a 2018 conviction by a Spanish court, which found him guilty of joining Islamic State militants in Syria.

However, the court said it would not review Samsam's claims and did not rule on whether the claims were true or not. The court argued that a ruling would not change his legal position regarding a reopening of his case in Spain.

The Danish intelligence agencies refused to confirm or deny in court that Samsam had worked for them, saying they could not discuss the identities of their informants.

The case surfaced amid a string of scandals involving the two Danish intelligence services, including leaks of highly classified state secrets. Last week, Denmark dropped charges against a former defence minister and a former spy chief over allegations of leaks.

Ahmed Samsam will appeal the verdict to the Danish Supreme Court, his lawyer Erbil Kaya told Reuters.

"He is disappointed, but today's verdict doesn't change anything about his possibility of reopening the case in Spain, as this case would probably have been appealed regardless of the verdict," Erbil Kaya said.

Samsam was arrested in Spain in 2017 and sentenced to eight years in prison over his ties to Islamic State. He was later transferred to Denmark where the sentence was shortened to six years.

He said during the trial that he intended to have his criminal case in Spain reopened.

The court argued that Samsam would have been convicted in Spain, regardless of his possible cooperation with Danish intelligence services

Spanish Criminal Procedure Law stipulates that a review of a final sentence may be requested when facts or evidence come to light which, had they been produced before, would have led to an acquittal or a lesser conviction.

(Reporting by Johannes Birkebaek;Editing by Bernadette Baum)

By Johannes Birkebaek