Police arrested Justin Bourque, 24, shortly after midnight local time in Moncton, a city of about 70,000 in the East Coast province of New Brunswick.
The arrest was witnessed by Moncton resident Michelle Thibodeau, CBC News reported. She told the broadcaster that after several police officers moved into her backyard, Bourque emerged from a patch of trees with his hands up and said, “I’m done.”
RCMP Superintendent Marlene Snowman told a media briefing that Bourque was unarmed at the time, although there were weapons found in the vicinity.
She said charges were being prepared and the suspect was expected to appear in court this week in Moncton.
“This is the outcome that we wanted. We wanted to have the arrest as quick as possible without any further injury or death to anyone. And that is what occurred and we are extremely pleased and proud of all the officers and the public that assisted us,” she said.
The RCMP also identified the three officers killed as Fabrice Georges Gevaudan, David Joseph Ross and Douglas James Larche.
Their deaths have spurred an outpouring of grief across the country. The last mass killing of police took place in Mayerthorpe in Alberta in 2005, when a gunman killed four officers before shooting himself.
“The only way we’ll get through this is by doing it together,” commander of the RCMP in New Brunswick, Roger Brown, said, his voice choked with emotion. “Please keep your thoughts and your prayers with us, with our families as we grieve and heal together.”
Hundreds of police, some in armored vehicles and some with dogs, had cordoned off a large area of the city on Thursday and warned residents to stay in their homes and lock their doors.
Bourque was named as a suspect late on Wednesday after the shootings. Police said he had no previous criminal record.
Police said they were alerted on Wednesday afternoon by a member of the public who spotted an armed man in camouflage clothing walking down a residential street. When police arrived, the man moved into a nearby wooded area and opened fire.