At least 16 people have been killed in a mass shooting in Nova Scotia - the deadliest such attack in Canada's history.
The suspected gunman was dressed as a police officer and had disguised his car to look like a police vehicle.
The shootings took place over 12 hours in the rural town of Portapique.
One of those killed was Heidi Stevenson, a 23-year veteran of the Royal Canadian Mounted Police and a married mother of two. A second officer was injured.
Brian Sauve, president of Canada's National Police Federation union, said: "Our hearts are heavy with grief and sadness today as we have lost one of our own."
The incident began on Saturday night in Portapique, about 80 miles north of Halifax, and police told residents to lock their homes and stay inside.
There were also reports of burning buildings in the town.
One of the town's residents, Christine Mills, said armed officers had been patrolling the town's streets and helicopters were also used to search for the suspect.
"It's nerve-wracking because you don't know if somebody has lost their mind and is going to beat in your front door," she said.
Police said the suspect Gabriel Wortman, a 51-year-old denturist, killed people in several locations and some of his victims were not known to him.
Chris Leather, the Nova Scotia RCMP's criminal operations officer, said Wortman had been seen wearing a police uniform but it was not clear whether he had been disguised as an officer during the shootings.
"The fact that this individual had a uniform and a police car at his disposal certainly speaks to it not being a random act," Mr Leather said.
Wortman was arrested at a petrol station, but he later died. Reports that he was shot dead by officers were not officially confirmed, although police did say that they had exchanged shots with Wortman at one point.
Police had said the suspect was driving what appeared to be a police car but later said he was believed to be in a small, silver Chevrolet SUV.
They confirmed he was not a police employee.
Police said the case was not being investigated as terrorism but Mr Leather said that police would look at a possible link to the closure of non-essential businesses due to the coronavirus outbreak.
Nova Scotia's Premier Stephen McNeil described the shooting as "one of the most senseless acts of violence in our province's history".
He added: "I never imagined when I went to bed last night that I would wake up to the horrific news that an active shooter was on the loose in Nova Scotia."
It has been a devastating day in Nova Scotia. To the families of the victims & to those who are still feeling afraid, my heart goes out to you. Know that all Nova Scotians are with you. I want to thank the @RCMPNS for apprehending the suspect & doing their best to protect NSians. pic.twitter.com/QqwuBN2J8a
— Stephen McNeil (@StephenMcNeil) April 19, 2020
Canadian Prime Minister Justin Trudeau said: "My heart goes out to everyone affected in what is a terrible situation".
To those who lost loved ones following the senseless violence in Nova Scotia, and to the @RCMPNS family mourning the loss of Cst. Heidi Stevenson, know Canadians across the country are mourning with you - and are here to support you through this tragedy. https://t.co/J6TM2od0Le
— Justin Trudeau (@JustinTrudeau) April 19, 2020
The ambassador of Ireland to Canada, Jim Kelly, said this was "a devastating day".
"Heartfelt sympathy to all those affected & sincere condolences to the families of the victims %& the RCMPNS which lost a courageous officer who gave her life in the line of duty", he said.
A devastating day in Nova Scotia. Heartfelt sympathy to all those affected & sincere condolences to the families of the victims & the @RCMPNS which lost a courageous officer who gave her life in the line of duty.
— Jim Kelly (@jimkelly2006) April 20, 2020
It is the deadliest shooting since a gunman killed 14 women in Montreal in 1989, a tragedy that resulted in an overhaul of Canada's gun laws.
It is illegal to possess an unregistered handgun or any kind of rapid-fire weapon and to buy a weapon requires training, a risk assessment, two references, spousal notification and criminal record checks.
The largest act of murder in Canadian history was when 268 Canadians were among 329 people who died in 1985 when an Air India plane was brought down by a bomb over the Atlantic.