A 50-year-old German man clearly intended to kill foreigners when he rammed his silver Mercedes into a crowd of people in the northwest German town of Bottrop in the early hours of New Year's Day, injuring four, a senior government official has said.

Police said the man, who was not named, made racist comments when he was stopped and arrested in the nearby city of Essen after fleeing the scene of the attack.

"A German man deliberately drove into crowds of people ... that were largely made up of foreigners. There was a clear intention by this man to kill foreigners," Herbert Reul, interior minister of the state of North Rhine-Westphalia, where Bottrop is located, told reporters on Tuesday.

Earlier, police and prosecutors said they suspected the attack, which took place at a crowded plaza, was deliberate and "linked to the xenophobic views of the driver".

They said there was also preliminary information that the man was mentally ill but he had no prior police record.

A police spokeswoman said Syrian and Afghan citizens were among those injured, but gave no further details. She said one of the four people injured remained in the hospital.

Earlier, the driver had steered his car at another pedestrian, who escaped unharmed, Reul said. He also targeted people at a bus stop after fleeing the scene of the Bottrop attack, but they were not injured, police said.

Horst Seehofer, Germany's federal interior minister, told Bild newspaper the Bottrop case would be carefully investigated, along with an incident that occurred in Bavaria on Saturday in which four asylum seekers were arrested on suspicion of attacking a dozen people.

"It is a matter of political credibility to pursue both cases decisively and aggressively," he told the paper.