A German court on Friday sentenced a former soldier to five and a half years in prison for plotting a far-right attack on senior politicians while posing as a Syrian refugee.

The long-delayed trial shone a spotlight on neo-Nazi sympathies within the German military and the effectiveness of the security services in standing up to right-wing extremism -- described by the interior minister as the biggest threat facing the country.

"The accused is guilty of planning a serious act of violence endangering the state," presiding judge Christoph Koller said as defendant Franco Albrecht listened impassively, his head slightly bowed.

Albrecht, a 33-year-old father of three, had been in the dock at the regional superior court in the western city of Frankfurt since May 2021.

The Bundeswehr lieutenant was found to have cited cabinet ministers, MPs and a prominent Jewish human rights activist among his potential targets. He was also convicted of weapons law violations and fraud.

Koller said Albrecht harboured "right-wing extremist and racist-nationalist views that hardened over several years".

The defendant saw leading public figures as responsible for a welcoming stance towards refugees that he believed would lead to the "replacement of the German nation".

Prosecutors had described the case as the first in the country's post-war history in which a member of the armed forces was accused of planning a terrorist attack.

Albrecht's defence team said he would appeal the verdict. The German military suspended him after he was charged and is expected to discharge him should the conviction be upheld.

Albrecht, who has a full beard and wears his long hair tied in a ponytail, told the court he deceived authorities at the height of the 2015-16 migrant influx, in which more than one million asylum seekers entered Germany.

He darkened his skin with makeup to pose as a penniless refugee and hoodwinked immigration officials for 15 months, despite speaking no Arabic, in a bid to expose what he called the deep flaws in the system.

The trial of Franco Albrecht shined a spotlight on neo-Nazi sympathies in the ranks of the German military
The trial of Franco Albrecht shined a spotlight on neo-Nazi sympathies in the ranks of the German military POOL via AFP / Thomas Lohnes

The soldier, the son of a German mother and an estranged Italian immigrant father, posed as a Christian fruit seller from Damascus called David Benjamin.

"Neither Arabic nor details about my story were necessary," Albrecht testified, describing his conversations with immigration authorities.

He was arrested in 2017 while trying to retrieve a Nazi-era pistol he had hidden in a toilet at Vienna's international airport, and his fraud was discovered when his fingerprints matched two separate identities.

Germany's then defence minister Ursula von der Leyen, now European Commission chief, said Albrecht's case pointed to a much larger "attitude problem" in the German military.

Von der Leyen's successor Annegret Kramp-Karrenbauer ordered the partial dissolution of the KSK commando force in 2020 after revelations that some of its members harboured neo-Nazi sympathies.

The court found that Albrecht planned to use both the pistol and other weapons and explosives he had taken from the German army in order to carry out an attack.

But prosecutors during the trial backed away for lack of evidence from an accusation that he plotted to use his false refugee identity to pin the crime on a Syrian.

The defence attorneys had called for a suspended sentence based solely on weapons law violations, while prosecutors demanded jail time of six years and three months.

Albrecht, who repeatedly expressed anti-Semitic, racist and hard nationalist views before the court during his trial, testified that then-chancellor Angela Merkel had failed to uphold the constitution by welcoming the refugees.

Albrecht had been free on bail as his trial began but was taken back into custody in February when he was found with Nazi memorabilia and further weapons in his possession, including five machetes under his mattress.

Koller said three months already served would count against the sentence.