The attacker died in a police operation on Thursday, shortly after he stabbed a policewoman with a knife.

Police said the man lived in Berlin and had been sentenced to prison by the regional court in Stuttgart in 2008. He was subsequently released on parole and also wore an electronic tag, which he removed on Thursday morning before the attack.

Investigators first learned of the incident via a phone call from a passer-by on Heerstrasse in western Berlin's Spandau area, according to local public broadcaster RBB. The caller said a man with a knife was threatening people. Four police cars reached the area, a police spokesman told reporters.

The man attacked one of the officers, who stepped out of her car. Several shots were fired after that, although it is not known how many police officers shot at the attacker.

The man died of his wounds despite repeated attempts to resuscitate him, police said. The policewoman, who was brutally injured in the knife attack, was flown to a hospital in a rescue helicopter.

Berlin's homicide squad is currently investigating the case.

mg/msh (dpa)