Investigating Judge Joaquin Gadea agreed to the public prosecutor’s request for prison without bail for Yassin Kanjaa.
After the 25-year-old Moroccan testified for over an hour in a court in central Madrid, the judge ruled that he should be tried for manslaughter and terrorism charges.
The judge said Kanjaa was not linked to any specific terrorist organization.
His flatmates told police that the suspect drank alcohol and smoked hashish until a radical change about a month ago, when he began listening very frequently to Quran audio recordings on his phone.