Three others were wounded, one of whom then managed to disarm the gunman, the Paris prosecutor’s office said.
Two of those injured remain in hospital but are stable.
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 office had already suggested on Saturday that a suspected racist motive had been added to initial accusations of murder and weapons offences.
It had also indicated that the man had recently been freed from detention pending a trial for a sabre attack on a migrant camp in Paris a year ago.
More on France
Related Topics:
Kurdish anger directed at police
The killings have shocked a community preparing to mark the anniversary of the unresolved murder of three activists 10 years ago.