BERLIN – German police have arrested a German soldier who had posed as a Syrian refugee, on suspicion he was planning an attack that would be blamed on Syrian refugees.

According to a report in Die Welt, he may have wanted to place the blame on refugees. Prosecutors in Frankfurt am Main confirmed on Thursday that a 28-year-old soldier was arrested on suspicion of disguising himself as Syrian refugee in order to carry out a serious act of violence with xenophobic motives.

According to Die Welt, the soldier registered as a Syrian refugee in Giessen, Hesse in December 2015 and applied for asylum at the beginning of 2016.

Authorities awarded him asylum, apparently not noticing his German background or the fact that he was unable to speak Arabic.

Austrian police first noticed the soldier when he attempted to hide an illegally acquired pistol at Vienna Airport, possibly with the intention of later using it to carry out an act of violence.

According to SBS, the officer, who was “of German background” and stationed in France, allegedly stashed a loaded pistol in a bathroom at the Vienna airport that was discovered, leading Austrian authorities to take him into temporary custody when he went to retrieve it in February, Niesen said.

Though under investigation in Austria, authorities there did not keep him in custody and he was arrested in southern Germany on Wednesday.

A 24-year-old student from the soldier’s hometown of Offenbach was also arrested. “We know from various voice recordings that both had anti-foreigner views,” Niesen said.

Terror blasts in Germany have fanned anti-refugee sentiments with people holding protests against refugees and government’s decision to welcome and accommodate refugees. It has been alleged that refugees from the war-torn countries have brought in terrorism.