Quebec police say the gun used to kill three people in the Montreal area this week was acquired illegally.
Provincial police spokeswoman Geneviève Gagnon says 26-year-old Abdulla Shaikh, who is suspected of killing the three men at random, did not have a firearms license.
But she says police still don't know how he obtained a gun.
Shaikh was killed by Montreal police Thursday morning, he is suspected of killing three men within a period of about 24 hours.
Quebec's mental health review board ruled in March that Shaikh, who was under the supervision of a mental health hospital after being found not criminally responsible in a November 2018 mischief case, posed a "significant risk" to public safety, but allowed him to continue living in the community.
Police allege he shot two men, André Fernand Lemieux, 64, and Mohamed Salah Belhaj, 48, on Tuesday night in Montreal and killed a third man, Alex Lévis Crevier, 22, in Laval, Que., around 24 hours later.