One person was killed and two others were injured on Saturday when a car ploughed into pedestrians in the southern German city of Heidelberg, said police, who shot and wounded the driver.
After the crash, which had injured one person seriously who later succumbed to injuries, the driver escaped on foot armed with a knife on a busy city centre street.
Officers tracked him down with help from witnesses and opened fire on the suspect who was “seriously wounded”, police said.
Police said it was not clear if the man had acted intentionally, telling AFP “We are continuing to investigate. As soon as we know more we will inform the public.”
German daily Bild reported that the suspect was suffering from psychiatric troubles, but authorities have made no comment on that claim.
Germany has been on high alert since a Tunisian allegedly rammed a truck into a crowded Christmas market in Berlin in December, killing 12 people, before being shot dead days later by police in Italy.
The Berlin carnage evoked memories of the July truck assault in the French Riviera city of Nice, where 86 people were killed by a Tunisian Islamic State group-sympathiser.