The 19-year-old was charged with criminal conspiracy | Julian Stratenschulte/AFP via Getty Images Germany charges Syrian man for ISIL affiliation Prosecutor said he ‘was prepared to carry out an attack in Germany.’

A 19-year-old Syrian has been charged with affiliation to a terrorist organization, Germany's federal prosecutor said in a statement Thursday.

The man, identified only as Shaas Al-M, was arrested in the city of Potsdam in March. He was charged with criminal conspiracy, and accused of belonging to ISIL. He has since been held in custody.

He first joined ISIL in mid-2013 and fought alongside the group's militants in the city of Deir el-Zour, according to the statement.

The prosecutor also said that he "was prepared to carry out an attack in Germany" and had scouted potential targets in Berlin. In Germany, he has served as a contact man for potential attackers and had arranged to send at least one person to Syria to fight.

Prosecutor said that the man came to Germany in the summer of 2015. Close to one million refugees entered Germany that year, many fleeing war in Syria. The statement did not specify whether he was among them.

The prosecutor's decision comes amid growing concerns about safety and security in Germany following the massive influx of asylum seekers that has contributed to the rise of the far-right, anti-immigrant party Alternative for Germany (AfD). In recent regional elections, the party gained representation in 10 of Germany's 16 state parliaments.