Police in Gelsenkirchen said the alleged perpetrator was attacking officers when he was shot. A similar incident in France saw another alleged attacker shot and injured by police.
Police in Germany have shot dead a man who was trying to assail police officers with a knife in the west German city of Gelsenkirchen.
The man hit a patrol car with an object and sought to charge at officers standing by the vehicle "with a raised object," a police spokesman told news agency Agence France-Presse on Sunday.
Police also said the attacker had a knife behind his back and called out, warning him to stop his assault. However, these demands fell on deaf ears and a 23-year-old policeman shot and killed the potential assailant.
Germany's top police institution revised the county's terror level over the weekend , citing possible terror attacks following the assassination of Iranian General Qassem Soleimani.
Many states are on high alert following a series of Islamist attacks, including a truck rampage at a Berlin Christmas market in 2016 that killed 12 people.
Similar attack in France
Meanwhile, in France, also on Sunday, police shot and injured a man who had rushed toward police officers wielding a knife screaming "Allahu akbar" ("God is greatest"), local officials said.
The incident occurred in the city of Metz and the local public prosecutor's office said it was communicating with the French anti-terrorism prosecutor's department. Interior Minister Christophe Castaner confirmed an investigation had already begun.
"I praise the quick thinking of the @PoliceNat57 (Moselle police force), which intervened to apprehend the individual. A probe is underway to determine the precise motivation and circumstances behind the act," Castaner tweeted.
The prosecutor's office said the suspect had suffered gunshot wounds to the upper leg. It added that he was already on a list for links to militant groups.
The Metz incident is the second to occur in France in the space of two days after a man went on a stabbing spree in Villejuif, on the outskirts of Paris, killing one person and wounding two others. He was subsequently shot dead by officers.
jsi/cmk (dpa, AFP, Reuters)