The suspect in the deadly knife attack in Würzburg was sent to a mental hospital, German investigators said.
Experts have determined that a 24-year-old Somali man cannot prosecute him for his actions.
Three women were killed and six others, including an 11-year-old child, were injured in an attack outside a shop in the Bavarian city on 25 June.
The suspect was shot in the leg and was arrested after people surrounded him and tried to restrain him with chairs and sticks.
In the aftermath of the attack, investigators said the motivation for Islamist extremism seemed likely, as witnesses reported that the man shouted “Allahu Akbar” twice and referred to “jihad” after his arrest.
But the Bavarian State Criminal Police Office and the Munich Prosecutor’s Office said on Tuesday they found no propaganda or other extremist material after checking his phones.
They added that there is no indication that anyone else was involved or knew of the attack.
De-radicalization and Islam experts are still assessing “whether the religious beliefs of the suspect may have played a role and to what extent” in the attack, it said in a statement.
The suspect was immediately jailed after being stabbed, but a local court ruled last week that he was temporarily transferred to a mental hospital after forensics raised doubts about whether he could be prosecuted.
He was hospitalized on Tuesday and the final examination “will take some time,” investigators said.
Prosecutors said two more incidents earlier this year resulted in the suspect being briefly sent to a psychiatric hospital.
The German Federal Anti-Terrorism Prosecutor’s Office was not asked to investigate the attack, but the case is being monitored by the Bavarian Central Office for Extremism and Terrorism.