TORONTO — Canadian police have charged a man for the deaths of two police officers and two civilians in a shooting that struck a nerve in a country that has been roiled in recent months by several instances of mass violence. Matthew Vincent Raymond, 48, was arrested and charged with four counts of first-degree murder, police said in a statement Saturday.

Horizon Health, which delivers care for New Brunswick's Department of Health, said Raymond was the only person being treated for injuries related to the shooting. He is due to appear in court August 27.

No motive has been disclosed.

Get Breaking News Delivered to Your Inbox

The victims have been identified as police Const. Robb Costello, 45, police Const. Sara Burns, 43, Donnie Robichaud, 42, and Bobbie-Lee Wright, 32. Robichaud and Wright were in a relationship, according to Facebook and Robichaud's cousin, Sean Callahan, who said they had just gotten together at the beginning of August.

Fredericton's deputy police chief Martin Gaudet said the two officers were responding to calls of shots fired at an apartment complex. He said they arrived and saw two deceased civilians before being shot and killed themselves.

Residents said they were stunned by the scene. The last homicide in the city of about 60,000 people was in 2014.

Residents pay their respects at a makeshift shrine created in front of police headquarters after four people were killed in a shooting in New Brunswick, Canada, on Friday, August 10, 2018. REUTERS

The shooting came as Canada wrestles with a string of violence, including an instance in Toronto last month where a man with a handgun opened fire in a crowded part of the city, killing two people and wounding 13 before he died in the confrontation.

In April, a man who linked himself to a misogynistic online community used a van to run down pedestrians in a busy part of Toronto, killing 10 people and injuring 14.

Authorities are also still pursuing leads in an ongoing investigation of a serial killer who has been charged with killing eight men in the city in recent years.

In 2014, a shooting in Moncton, New Brunswick left three Royal Canadian Mounted Police officers dead and two wounded.