Denmark’s domestic and foreign intelligence services on Wednesday won a case against a Dane of Syrian origin who claimed he worked for them in Syria in 2013 and 2014 and spied on Danish jihadi fighters.

Ahmed Samsam was sentenced to eight years in 2018 in Spain for fighting with the Islamic State group in Syria. He sued Denmark's two spy agencies in an attempt to have a court order them to admit that he had worked for them, and hoping it would enable him to reopen the case in Spain.

The Eastern High Court in Copenhagen said in its ruling that Samsam had not made it likely that he could reopen his case in Spain. He immediately appealed the ruling to Denmark’s top court.

ANTI-IMMIGRATION POPULIST PARTY REBOUNDS IN SWITZERLAND WITH 9-SEAT GAIN; PROGRESSIVES LOSE GROUND

The case has proven embarrassing for the Danish government, which has opposed an inquiry into the case. A preliminary parliamentary committee that was supposed to probe the 34-year-old Danish citizen’s claims was dropped in June.

Danish media say the case is probably linked to a former defense minister, a former spy chief and a former intelligence operative who reportedly was Samsam’s handler. The three were accused of leaking confidential information but the charges were dropped earlier this month, and the entire saga is shrouded in secrecy.

Danish flag

The Danish flag is photographed in Ega, Denmark, April 16, 2020. (photo by Kristian Buus/In Pictures via Getty Images)

Both Denmark's domestic security service, known by its acronym PET, and the foreign intelligence service, known as FE, have insisted on never confirming the identities of informants.

In a joint statement, PET and FE said they were satisfied with the outcome and noted that "it has been important" to them to emphasize that there is no basis for assuming that Ahmed Samsam had been wrongfully convicted in Spain.

PRO-PALESTINIAN PROTESTS TURN VIOLENT ACROSS EUROPE

Samsam, a former gang member in Denmark with a criminal record, has admitted travelling to Syria in 2012 to fight Syrian President Bashar Assad's government. He has repeatedly denied having ties to the Islamic State group and told courts in Spain and Denmark that he had fought with a rival group called Kataib Al Iman. He also claimed that he worked under cover in Syria for for PET, and later for FE, in 2013 and 2014. His task was to spy on Danish jihadis.

Samsam claimed Denmark’s intelligence agencies failed to contact Spanish authorities when he was arrested in 2017 while on a vacation in Spain.

In 2018, Spain’s National Court convicted him of being a foreign fighter with IS, saying he took part in major battles in Syria, including the August 2014 battle for the airport in Raqqa, the former de facto capital of the self-proclaimed IS caliphate. It also found him guilty of financing terrorism, obtaining firearms in Spain and promoting jihad on social media. The sentence was affirmed by a high court.

CLICK HERE TO GET THE FOX NEWS APP

Since 2020, Samsam has been serving his sentence in Denmark, where it was reduced to six years. Danish authorities did not press separate charges against him.