A 16-year-old girl who stabbed a German police officer after being ordered to carry out an 'act of martyrdom' for ISIS has been jailed for six years.

The teenage extremist, identified only as Safia S. under German privacy regulations, launched the attack on the policewoman in Hanover's main train station last February.

She was jailed for the attack after appearing at Celle state court today.

Safia S (pictured) was said to be furious and frustrated that she could not join ISIS in Syria and took out her anger on a German policewoman

A 16-year-old girl has been convicted in Germany of stabbing and wounding a police officer at the behest of ISIS. Veiled women are pictured arriving at the Higher Regional Court in Celle near Hanover, northern Germany today

The teenager, identified only as Safia S. under German privacy regulations, was sentenced to six years in prison at Celle state court. A van carrying the defendant to court is pictured

The German-Moroccan dual citizen travelled to Istanbul a year ago hoping to reach Syria only to be brought back by her mother.

But this was not before prosecutors say ISIS members tasked her with carrying out an attack in Germany.

She used a kitchen knife to attack her victim, who had stopped the extremist for a routing check and nearly died after the assault.

S., 15 at the time, was arrested at the scene of the crime.

She was convicted earlier this month of attempted murder and of supporting a foreign terrorist organisation.

Police said later the teenager was 'frustrated' because she could not get to Syria to fight with her Jihadist idols.

The German-Moroccan dual citizen travelled to Istanbul a year ago hoping to reach Syria only to be brought back by her mother

The teenager was convicted and jailed for the attack after appearing at Celle state court today

Prosecutors said at the trial - held behind closed doors because she is a minor - that she was 'motivated by members of Isis in Syria to commit this act.'

Police said at the time: 'As she was politely pulled to one side to confirm her identity a knife appeared lighteningly quick in her hand and our colleagues had little chance to defend themselves. This was an Islamic attack against our officers.'

One officer received a huge knife wound in her throat and was only saved through an emergency operation lasting several hours. 'It is a miracle that she survived at all,' added the spokesman.

'The attacker was ice cold. Her only worry was that her headscarf was rumpled and she wanted to put it straight. It was nothing to her if the police officer lived or died.'

Police said she was radicalised into Jihadism in Germany in November 2015 and admitted under questioning that she wanted to travel to the middle east to fight with Isis.

Although she made it to Turkey, her mother brought her back to Germany. But Isis ordered her to carry out an 'act of martyrdom' when she arrived home.

Germany endured four attacks within a week in July, including two assaults claimed by Isis, provoking a furious debate about security and asylum seekers.

Prosecutors say Safia S. belonged to a network of young followers of ISIS in Hanover.