German police say a man has died after setting fire to himself in a central square in Munich. His motives are unclear.

Police said the 54-year-old Munich resident, whom they didn't identify, drove at about 3am Friday to the Marienplatz square, where the Bavarian capital's city hall is located. He poured several litres of gasoline over himself and set himself ablaze.

Passers-by extinguished the flames. He was taken to a hospital but died about an hour later.

Police said the man had scrawled slogans on his car along the lines of “Never again war on German soil” and “Amri is only the tip of the iceberg” — a reference to Anis Amri, the Tunisian who attacked a Christmas market in Berlin and whom authorities had previously been unable to deport.

Police are investigating the incident but declined to speculate on the man's political motivations.