A man drove into a group of people standing by a bakery in the German town of Heidelberg on Saturday, injuring three people, one of them seriously.
A police spokesman said it was not yet possible to say whether it was a terrorist attack.
In a statement police said the suspect was seen to get out of the vehicle with a knife and was later tracked down to a swimming pool with the help of eyewitnesses, reports Reuters.
He is now in a hospital in Heidelberg having been shot by police while being arrested, leaving him seriously injured, they said.
Investigations by the public prosecutors’ office in Heidelberg and the town’s criminal police were continuing.
The German authorities are on high alert after a failed Tunisian asylum-seeker drove a truck into a Christmas market in Berlin on Dec. 19, killing 12 people.