Berlin police on Wednesday arrested a German lieutenant suspected of posing as a Syrian refugee to carry out an attack that would be blamed on migrants, The Washington Post reported.

The 28-year-old officer, whose name has not been disclosed, is facing charges of plotting a terrorist attack, fraud and violation of gun laws after being arrested while undergoing training in Germany, the daily said.

A 24-year-old student suspected of being the officer's accomplice was also arrested after police raids in Germany, France and Austria.

A "variety of weapons" found in the 24-year-old's house have also been recovered by the police, the Post said.

The discovery of weapons in the student's home and the officer's assumed identity as a Syrian refugee have led authorities to believe that the two men were planning an attack to fuel resentment against asylum seekers, the daily said.

The publication quoted Nadja Niesen, spokeswoman of the Frankfurt prosecutor's office, as saying that the lieutenant and the 24-year-old had exchanged phone messages revealing “a xenophobic attitude."

According to the Post, the main suspect had registered as a Syrian refugee in 2015 and subsequently applied for registration in Bavaria.

The lietenant was given a place in a refugee shelter in Bavaria and was receiving benefits as well, the Post added, quoting prosecutors in Frankfurt who are in charge of the investigation.

Earlier this year, the suspect was temporarily held by authorities in Austria when he attempted to retrieve a loaded gun he had hidden in a restroom at Vienna airport.

The daily quoted Niesen as saying that the suspect did not appear to have any Arabic language skills.

"Why this went unnoticed, I'm unable to say," Niesen added.

The officer had been stationed in France, however: "it does not mean that he was there every day. He could move freely in his spare time," a spokeswoman of Germany's Federal Criminal Police Office explained.