A 24-year-old man accused of killing two people with a sword and injuring five others on Halloween night in Quebec City made a brief court appearance Thursday while four of the injured, including two French nationals, were named.

The suspect, Carl Girouard, who suffers from mental disorders according to several local media, appeared at the hearing via video conference from a detention centre.

The Montreal area man is charged with two counts of premeditated murder and five of attempted murder.

Prosecutor Francois Godin told reporters outside the Quebec City courthouse that a bail hearing was scheduled for November 20.

"This morning, we asked the judge to lift a publication ban" on details of the case that would allow for the release of the victims' names, he added.

Four of the injured consented to being named publicly. They are Remy Belanger, Gilberto Porras, Lisa Mahmoud and Pierre Lagrevol.

The latter two are French nationals who have been living in Canada for several years, according to the police. They did not immediately respond to AFP requests for interviews.

Police arrest a suspect in Quebec City sword attack on Halloween that left two dead and five injured
Police arrest a suspect in Quebec City sword attack on Halloween that left two dead and five injured AFP / Steve JOLICOEUR

The suspect wanted to kill as many people as possible during the rampage, which police said was motivated by what they called personal reasons, and not terrorism. He had planned the attack in advance.

Armed with a "Katana-type" sword and dressed in medieval clothes, Girouard sowed terror and death over several hours in the streets of Old Quebec's fortified walls and ramparts, targeting victims at random.

Because of pandemic restrictions, Halloween festivities were scaled back and there were few people outside.

He was arrested shortly before 1 am Sunday by the waterfront after a manhunt.

The two people killed were Quebec City residents Fran?ois Duchesne, 56, and Suzanne Clermont, 61.

Clermont was a hairdresser and Duchesne was director of communications and marketing at the Musee national des Beaux-Arts in Quebec.

Prime Minister Justin Trudeau called the attack a "terrible tragedy."