BERLIN (Reuters) - A 16-year-old girl who stabbed a policeman at a train station in Hanover was acting under orders from Islamic State, German federal prosecutors said on Monday.

Safia S., a German-Moroccan dual citizen who is in prison awaiting trial, was charged with attempted murder and with being a supporter of the jihadist group, prosecutors said.

She travelled to Istanbul in January, where she met members of the group who planned to help her enter Islamic State-controlled territory in Syria.

While in Istanbul, she received orders from Islamic State members to carry out a “martyrdom attack” in Germany, prosecutors said.

She stabbed and seriously wounded the policeman in February after she was brought back to Germany by her mother, the prosecution said in a statement.

After being returned to Germany, Safia S. contacted Islamic State members online and asked them to help her plan an attack, prosecutors said.

They said a 19-year-old Syrian-German who knew about the plan and who is also in custody was charged with failing to report a crime. No date for their trials has been set.

The Hanover stabbing preceded attacks against civilians in Germany in late July, including two claimed by Islamic State in which only the assailants died.

Those attacks put the relatively liberal migration policies implemented by Chancellor Angela Merkel back in the spotlight and prompted her government to draft plans to increase spending on security.

In a separate case, federal prosecutors asked a judge to issue an arrest warrant against a 27-year-old Iraqi, identified only as Rami K., who is accused of having committed war crimes in 2015 as a member of the Iraqi government’s security forces.

Prosecutors said the man had posted pictures on social media in which he appears holding the decapitated heads of Islamic State fighters killed north of Baghdad.

Prosecutors did not say if he was suspected of having taken part in the decapitations. They said he was being charged with taking part in humiliating and degrading treatment.

They did not say when he arrived in Germany or if he was seeking asylum.