Halloween in Quebec turned out to be a night of terror after a 24-year-old man dressed in medieval costume began to attack residents with a sword.

Police said that the suspect killed two and left five others with "significant lacerations" before he was apprehended.

Authorities said residents remained shaken as a night of trick or treating quickly turned gruesome. The murders occurred late Saturday in Quebec's old quarter.

The attacker, whom authorities have yet to identify, evaded first responders. Police issued a warning to all citizens to avoid the area around Parliament Hill. A search resulted in the suspect's arrest 1 a.m. local time. Citizens were asked to remain indoors while officers searched the area.

Officials said the man may be suffering from mental illness but that his actions were premeditated and that it may have been personal in nature. An investigation into his motives is still being conducted. So far, terrorist motives have been ruled out.

"Everything leads us to believe that his motives were personal in nature. Up until now he has not been linked to any terrorist organization," Quebec police chief Robert Pigeon said Sunday.

The five victims who were injured were hospitalized. The suspect was also taken to a nearby hospital for evaluation.

Quebec Premier François Legault offered his condolences to the families of the two dead.

Prime Minister Justin Trudeau sent his condolences to the families and wished the injured a full recovery.