Updated

A 30-year-old Iraqi man detained after a series of crashes on a Berlin highway Tuesday evening is being investigated for what prosecutors have called an Islamist extremist attack.

Six people were injured, three of them severely, when the man’s car struck several vehicles along a stretch of the German capital’s highway. He allegedly targeted motorcyclists.

SOMALIA HOTEL ATTACKED BY CAR BOMB, GUNMEN; AT LEAST 5 DEAD IN THE CHAOS

“According to the current state of our investigation, we assume this was an Islamist-motivated attack,” Berlin's senator for the interior, Andreas Geisel, said. “A religiously motivated background cannot be excluded.”

Investigators said there were indications that the man was suffering from psychological problems.

“The fact that the suspect was possibly suffering from psychological problems does not make this issue any easier,” Geisel said. “If personal problems mix with religiously loaded ideas, this can lead to uncontrollable acts — yesterday's events have shown in a very painful way how vulnerable our society is.”

A car and a motorcycle stand on the city motorway A100 after an accident in Berlin, Germany, on Wednesday. The city's highway was still shut down after a series of traffic accidents that were allegedly all caused by one man. (Paul Zinken/dpa via AP)

While the man appeared to have acted alone, investigators were looking into whether he has ties to any terrorist group or if other people were involved in the attack, prosecutor Martin Steltner told reporters.

Witnesses said the man stopped his car, a black Opel Astra, after the third crash and pulled out an old ammunition box he claimed had explosives inside, local media reported. He reportedly shouted “Allahu akbar” or “God is great,” as he got out of his car. Bild daily wrote he also shouted, “Nobody gets closer, or you will all die.”

Police arrested the suspect and found the box contained only tools.

An investigator works on the scene Wednesday following several accidents on the city motorway A100 in Berlin. According to German news agency dpa, prosecutors say a series of crashes caused by a 30-year-old Iraqi man on the highway late Tuesday night was an Islamic extremist attack. (Paul Zinken/dpa via AP)

Prosecutors did not reveal the man's identity, as is customary in Germany, but local media identified the suspect as Samrad A. He is being investigated for three cases of attempted murder.

The man is known to Berlin police, daily Tagesspiegel reported. He was born in Baghdad in 1990 and lived in a refugee home in Berlin. In 2018, he was detained for injuring others and taken to a mental health institution for a short time, according to the paper.

Authorities said the suspect allegedly collided with vehicles at three different locations on the BAB100 highway shortly before 7 p.m. local time.

RADICAL ISLAMIC CLERIC ACCUSED OF RECRUITING FOR ISIS EXTRADITED TO NYC ON TERRORISM CHARGES

Steltner said the man first hit a car on the highway in the Wilmersdorf neighborhood, then drove into a motorcyclist, leaving him behind with life-threatening injuries. He hit a second person on a motor scooter and eventually used his car to push a third motorcyclist into the front of another car. The suspect finally got out of his car near the Alboinstrasse exit in Berlin's Tempelhof district.

Among the three severely injured people, one is in critical condition with severe head and back injuries, Steltner said. One of the three was a firefighter heading home from work.

Berlin Mayor Michael Mueller said later on Wednesday that he was shocked by the attack.

CLICK HERE TO GET THE FOX NEWS APP

"I wish all the victims a speedy recovery and a lot of strength for this difficult time,” Mueller said on Twitter.

The Associated Press contributed to this report.