An Islamic extremist has been killed by police in the German capital of Berlin after he stabbed an officer in an apparent terror attack.

The 41-year-old Iraqi citizen, identified only as Rafik Y, was shot dead by police after they responded to calls of a man wielding a knife.

The dead man was one of three who were convicted for plotting to assassinate the former Prime Minister of Iraq, Iyad Allawi, during his visit to Berlin in 2004. The court ordered that his face be obscured in media photographs.