German army uniform
German Bundeswehr army soldiers demonstrate their skills at Kaserne Hochstaufen (mountain infantry military barracks) in Bad Reichenhall, southern Germany Michaela Rehle/Reuters

A German soldier who pretended to be a Syrian refugee for more than a year has been arrested on suspicion of planning a terror attack, Frankfurt prosecutors said on Thursday (27 April).

The lieutenant, who has not been named due to privacy laws, serves with a German army brigade based in a French town south of Strasbourg, Reuters reported. He was arrested in Bavaria on Wednesday (26 April).

While authorities said the man's "concrete attack targets are not known", investigators believe he was driven by a "xenophobic background" to potentially launch an assault on migrants and refugees.

Austrian police initially detained the 28-year-old soldier back in February after he stashed a gun illegally in a toilet at Vienna's main airport the previous month. He was later released due to a lack of evidence, according to Deutsche Welle (DW).

"Based on the current investigation the prosecutor's office believes, or has at least suspicions, that the accused soldier had possibly planned to carry out a severe act of violence in terms of an attack with the weapon stored in Vienna," prosecutor Nadja Niesen said at a press conference.

The suspect's fingerprints indicated that he had used a false identity to register as a Syrian refugee in Giessen, near Frankfurt, in January 2016, according to Reuters.

He later applied for asylum and moved into a shelter for migrants and also received welfare support.

Questions are being asked about how the soldier was able to register as a Syrian refugee despite speaking French, but no Arabic.

"I can't say why this was not noticed," said Niesen.

A 24-year-old student from Offenbach, near Frankfurt was also arrested. Authorities believe he has a far-right, extremist background and he was detained after explosives were found in his possession.

"We know from various voice messages that both of the accused harbour xenophobic views," added Niesen.

According to reports, police in Austria, France and Germany searched 16 properties in connection with the investigation on 26 April. Mobile phones, laptops and documents were seized as part of the probe.