The suspect detained over the killing of three Kurdish people in Paris told investigators of his "hatred of foreigners", the Paris prosecutor said on Sunday.
The 69-year-old man was arrested on Friday after shooting dead two men and a woman at a Kurdish cultural center and nearby Kurdish cafe in the 10th district of Paris.
The killings stunned a community preparing to commemorate the 10th anniversary of the unresolved murder of three activists and prompted protests that led to clashes with police.
The suspect said during questioning that a burglary at his home in 2016 had triggered a "hatred of foreigners that became totally pathological", prosecutor Laure Beccuau said in a statement.
The man described himself as depressive and having suicidal tendencies, recounting that he had planned to kill himself with the last bullet after his attack, the prosecutor said.
A search at the home of the suspect's parents, where he lived, did not find evidence of any link to extremist ideology, she said, adding that he had first sought potential victims in a suburb of the French capital but abandoned that plan after finding few people in the neighborhood.
The suspect remained in a psychiatric unit on Sunday after his questioning was halted on Saturday on medical grounds, the prosecutor said.
Regarding three other people injured in the shooting, two were still in hospital but their lives were not in danger, she added.
The prosecutor had previously said that the suspect had been freed from detention recently while awaiting trial for a sabre attack on a migrant camp in Paris a year ago.