Sami A. has denied being the former bodyguard of late Al-Qaeda leader Bin Laden (File)

A man who allegedly worked as Osama bin Laden's bodyguard has been detained in Tunisia as part of a terrorism probe after his expulsion from Germany, a prosecution spokesman said Saturday.

Known as Sami A. by German authorities and Sami Idoudi in his home country, the Tunisian "has been taken into custody following a judicial decision by the prosecutor of Tunis," said spokesman Sofiene Sliti.

He was wanted on "suspicion of involvement in extremist activities in Germany", following an investigation by the anti-terrorism unit, Sliti added.

Tunisian legislation allows cases to be brought against citizens accused of terrorism crimes abroad, Sliti said.

The 42-year-old suspect returned to Tunis on Friday, following a lengthy legal battle in Germany over his deportation.

Idoudi had lived in Germany for more than two decades, staying in the country despite his asylum request being denied in 2007 as courts cited the danger of torture in Tunisia.

The legal dispute is set to continue as a German court on Friday ordered Idoudi be returned to the country, after a ruling blocking the expulsion arrived once his plane was already airborne.

The court said his expulsion was illegal and accused authorities of "knowingly" defying the order by completing his transfer to authorities in Tunis.

The Tunisian authorities "have not received any official written request" for his return, said Sliti, who also represents the country's anti-terrorism unit.

He was unable to confirm whether Tunisian authorities intended to send the detainee back to Germany.

Considered a security threat over his suspected ties to Islamist groups, Idoudi has for years had to report to police but was never charged with an offence.

He has always denied being the former bodyguard of late Al-Qaeda leader Bin Laden, the mastermind behind the 9/11 attacks on the United States.