He then travelled to the Ahmet-Kaya Kurdish centre in Paris's 10th district, where he carried out the attack.
The man resented that community because Kurdish militiamen involved in the Syrian conflict had "taken prisoners during their fight against Islamic State instead of killing them", the prosecutors say.