A gunman disguised as a police officer shot people in their homes and set fires in a 12-hour rampage across the Canadian province of Nova Scotia that killed at least 19 people, the deadliest such attack in the country's history. Officials said Sunday the suspected shooter was also dead, but did not release details.

A police officer was among those killed.

Several bodies were found inside and outside one home in the small, rural town of Portapique, about 60 miles north of Halifax, which police called the first scene. Bodies were also found at other locations.

The assault began late Saturday, and authorities believe the shooter may have targeted his first victims but then began attacking randomly.

Get Breaking News Delivered to Your Inbox Click here to view related media. click to expand

Overnight, police began advising residents of the town — already on lockdown because of the coronavirus pandemic — to lock their doors and stay in their basements. Several homes in the area were set on fire, as well.

Police identified the man believed to be the shooter as Gabriel Wortman, 51, who was thought to live part-time in Portapique. Authorities said he part of wore a police uniform at one point and tried to make his car look like a Royal Canadian Mounted Police (RCMP) cruiser.

Members of the Royal Canadian Mounted Police (RCMP) tactical unit confer after the suspect in a deadly shooting rampage was neutralized at the Big Stop near Elmsdale, Nova Scotia, Canada, on April 19, 2020. Getty

Police first announced that they had arrested Wortman at a gas station in Enfield, outside Halifax, but later said he had died. It was not clear how, and they did not explain further.

"This is one of the most senseless acts of violence in our province's history," said Nova Scotia Premier Stephen McNeil.

The RCMP confirmed Monday that "there are in excess of 19 victims" and that the toll may rise as they search the sites of homes that burned to the ground. The dead officer was identified as Constable Heidi Stevenson, a mother of two and a 23-year veteran of the force. Another officer was wounded.

Royal Canadian Mounted Police (RCMP) Constable Heidi Stevenson, who was shot and killed by a gunman April 19, 2020, poses for an undated official photo. RCMP via Reuters

Mass shootings are relatively rare in Canada. The country overhauled its gun-control laws after gunman Marc Lepine killed 14 women and himself at Montreal's Ecole Polytechnique college in 1989. Before this weekend's rampage, that had been the country's worst.

It is now illegal to possess an unregistered handgun or any kind of rapid-fire weapon in Canada. The country also requires training, a personal risk assessment, two references, spousal notification and criminal record checks to purchase a weapon.

"As a country, in moments like these, we come together to support one another. Together we will mourn with the families of the victims, and help them get through this difficult time," Prime Minister Justin Trudeau said in a written news release.

While they believe the attack did not begin as random, police did not say what the initial motive was. RCMP Chief Superintendent Chris Leather said many of the victims did not know the shooter.

"That fact that this individual had a uniform and a police car at his disposal certainly speaks to it not being a random act," Leather said. He added that police believe he acted alone.

Leather said they would investigate whether the attack had anything to do with the coronavirus pandemic but no link has been found thus far.

At one point, there was an exchange of gunfire between the suspect and police, he said.

Late Sunday morning, there were half a dozen police vehicles at the scene of the gas station where the suspect died. Yellow police tape surrounded the gas pumps, and a large silver-colored SUV was being investigated.

Cpl. Lisa Croteau, a spokeswoman with the provincial force, said police received a call about "a person with firearms" late Saturday night, and the investigation "evolved into an active shooting investigation."

Christine Mills, a resident of the area, said it had been a frightening night for the small town, with armed officers patrolling the streets. In the morning, helicopters flew overhead searching 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.

Tom Taggart, a lawmaker who represents the Portapique area in the Municipality of Colchester, said the quiet community has been shaken.

"This is just an absolutely wonderful, peaceful quiet community and the idea that this could happen in our community is unbelievable," Taggart said by phone from his home in nearby Bass River.

A Gabriel Wortman is listed as a denturist — a person who makes dentures — in the city of Dartmouth, near Halifax, according to the Denturist Society of Nova Scotia website. A suspect photo issued by the RCMP appears to be of the same person seen in video footage being interviewed about dentures by CTV Atlantic in 2014.

Mills also said Wortman was known locally as someone who divided his time between a residence in Halifax and one in Portapique.

Taggart said he didn't know Wortman well, but spoke to him a few times when he telephoned about municipal issues.

Taggart described knowing Wortman's "lovely big home" on Portapique Beach Road.