BERLIN (Reuters) - German prosecutors have charged a man arrested on New Year’s day with attempted murder after he rammed his car into crowds of revelers in two separate attacks, police said on Wednesday.

The 50-year-old German was detained after he drove his Mercedes into people celebrating the New Year in the western cities of Bottrop and Essen in a suspected hate crime in which eight foreigners were injured.

Police in the city of Munster said a judge had approved a request by prosecutors to formally charge him with multiple counts of attempted murder.

All but one of the eight people injured were from Syria and Afghanistan. An eighth man who suffered a leg injury was identified as a 34-year-old German-Turk from Essen.

A Syrian woman who suffered life-threatening injuries is recovering in hospital after an emergency operation, police said.

The suspect had made racist remarks when police officers detained him near Essen, police said.