A general view is pictured of the area where convicted member of a terrorist group named Rafik Mohamad Yousef was shot dead by police in Berlin, Germany, September 17, 2015. Reuters German police said on Thursday that they had shot dead a man they described as a convicted member of a terrorist group after he attacked a policewoman in western Berlin with a knife.

"He had been convicted of being a member of a terrorist association and of being involved in a plot to murder the Iraqi prime minister," Berlin police said on Twitter.

German media identified the man as Rafik Y. In 2008, three men, including one named Rafik Mohamad Yousef, were convicted in Germany of hatching a plot to kill Iraqi prime minister Ayad Allawi during a visit to Berlin in 2004.

Berlin prosecutor Michael von Hagen said the man had served out his prison sentence and was wearing an electronic foot tag that allowed authorities to track his movements.

It was unclear why he had attacked the policewoman. "We can't say whether this crime has Islamist motives in any way or not - investigations are only just starting," von Hagen said.

He said a second police officer had fired four shots at the man, hitting him with two bullets, and he died at the scene.

The policewoman was seriously wounded and was in a stable condition in intensive care, police said.

At the time of the Allawi plot in 2004, prosecutors said the three men arrested were members of Ansar al-Islam, an Iraqi insurgent group which the United States said was linked to al Qaeda.