Authorities said the suspect had an "Islamic terror motive."
VILLACH, Austria -- A 14-year-old boy was fatally stabbed and four others were injured in a knife attack in Villach, Austria, on Saturday, according to police.
A 23-year-old Syrian suspect has been taken into custody after being apprehended with the help of a civilian -- also Syrian -- who rammed the suspect with a car, according to Paul Eidenberger, a spokesperson for the Austrian Federal Police.
Officials said during a press conference on Sunday morning that the suspect had an "Islamic terror motive" for the attack, The Associated Press reported.
Interior Minister Gerhard Karner on Sunday expressed his "anger about an Islamist attacker who indiscriminately stabbed innocent people here in this city."
Karner told reporters in Villach that the attacker had ties to the Islamic State group and radicalized himself online within a very short time.
The attack happened near food stands in a public area of the town's main square around 4 p.m. local time, according to police.
The five victims who were attacked were all Austrian citizens and included two 16-year-old boys, who sustained major injuries. Two other victims -- 28 years old and 32 years old -- sustained minor injuries, police said.
The suspect was slightly injured when the civilian rammed him with a car. He was then apprehended by two officers without any resistance, police said.
State governor Peter Kaiser thanked the 42-year-old man -- also a Syrian and working for a food delivery company -- who drove toward the suspect and helped prevent further casualties. "This shows how closely terrorist evil but also human good can be united in one and the same nationality," Kaiser said.
The attacker was legally residing in Austria and was in the process of seeking asylum. He had no prior contact with police before this incident, police said.
The suspect lived in the outskirts of Villach and his house has been searched. He will be questioned during the night, police said.
Authorities are investigating whether the suspect had any connection to the victims.
ABC News' Victoria Beaule contributed to this report.