Yannick Bandaogo pleaded guilty in a New Westminster, B.C., court to second-degree murder, several charges of attempted murder and one count of aggravated assault.
Bandaogo was arrested shortly after the attack in March 2021 near the library where a woman was killed and six other people were hurt.
The victims ranged in age from 22 to 78.
Bandaogo, who was originally from Quebec, made his plea in French.
He didn’t speak to the court on Monday, other than to answer the judge that he understood the consequences of pleading guilty and giving up his right to a trial.
The court was given an agreed statement of facts describing the man’s rampage that day.
Police said at the time that Bandaogo didn’t know any of his victims.
He was treated in hospital after the attack for what police said were self-inflicted wounds.
Bandaogo will be back in court for sentencing on July 5.