At least 36 people including a child were hurt on Thursday when the 24-year-old man ploughed into demonstrators gathered in the city centre, putting security back in focus before next week's election.
"He has admitted that he deliberately drove into the participants of the demonstration," prosecutor Gabriele Tilmann told a press conference.
"I'm very cautious about making hasty judgements, but based on everything we know at the moment, I would venture to speak of an Islamist motivation for the crime," she added.
A preliminary search of his phone and social media accounts showed he was openly religious and suggested an Islamist motive behind the attack, Tilmann said.
She said the suspect was particularly active on Instagram, where he posted about bodybuilding, athletics and also expressed his religious beliefs.
Tilmann also cited the testimony of police officers that the driver had shouted "Allahu Akbar" afterwards as evidence of a possible Islamist motive.
The incident also came hours before international leaders including US Vice President JD Vance and Ukrainian President Volodymyr Zelenskiy were due to arrive in the city for the Munich Security Conference.
Police said a white car had approached police vehicles that were accompanying a demonstration of striking trade union workers, before speeding up and hitting people.
Bavarian interior minister Joachim Herrmann said the man had not previously been found guilty of shoplifting, contradicting statements made earlier in the day.
He came to Germany at the end of 2016 as an unaccompanied minor refugee.
His asylum procedure was finalised in 2020 with a rejection notice and an order to leave the country.
Bavarian state premier Markus Söder called the incident "a punch in the face" for Germany and said there must be consequences once authorities determine exactly what happened.
The incident follows a series of attacks involving immigrants in recent months that have pushed migration to the forefront of the campaign for Germany's February 23 election.
In December, six people were killed in an attack on a Christmas market in Magdeburg and last month a toddler and adult were killed in a knife attack in the Bavarian town of Aschaffenburg.
Immigrants have been arrested over both attacks.
Conservative Friedrich Merz, frontrunner to be Germany's next chancellor, said safety would be his top priority.
"We will enforce law and order. Everyone must feel safe in our country again. Something has to change in Germany," Merz posted on X.
Social Democrat Chancellor Olaf Scholz said the perpetrator could not hope for leniency.
"He must be punished and he must leave the country," said Scholz, according to news outlet Focus Online.
"If it was an attack, we must take consistent action against possible perpetrators with all means of justice."
with Reuters and DPA