Behind the wheel of his silver Mercedes-Benz, this driver was out to kill, police say.

A German man repeatedly drove into crowds in the western city of Bottrop in what authorities there are characterizing as a hate crime.

The driver, who was arrested in the Tuesday mayhem, appeared to be targeting foreigners, police said.

He injured at least five people, one of whom has life-threatening injuries.

“The man had the clear intention to kill foreigners,” German news agency dpa quoted the top security official in North Rhine-Westphalia state, Herbert Reul, as saying.

Some of the victims were Syrian and Afghan citizens.

The attacks began shortly after midnight while people were celebrating New Year’s out on the streets.

The 50-year-old driver first attempted to hit a group of people in Bottrop, but failed. He then drove into the city center, where he slammed his Mercedes into a crowd, injuring four.

He then drove toward Essen, officials say. There he twice attempted to run people down, injuring one person, before being arrested by police.

The man, whose name wasn’t released, is being held on suspicion of attempted homicide. Police said the suspect made anti-foreigner comments during his arrest and there were indications he had been treated for mental illness in the past.

It’s not the first time that a vehicle has been used as an apparent weapon in Germany.

In April, a German man drove a van into a crowd in Muenster, killing four people and injuring dozens. The driver, who had sought psychological help in the weeks preceding the attack, then killed himself.

On Dec. 19, 2016, a Tunisian man plowed a truck into a busy Christmas market in Berlin, killing 12 people. The attack was claimed by the Islamic State group. The driver, who fled the scene, was later killed in a shootout with police in Italy.