Four people have been killed and several injured in shootings in the western Canadian province of Saskatchewan, police say.
They say a male suspect is now in custody and children have been moved to safety after the shootings at La Loche Community School and another location.
Canadian PM Justin Trudeau said earlier that five people had been killed, but this was later corrected.
The school shooting was "every parent's worst nightmare", Mr Trudeau said.
"The community is reeling."
Mr Trudeau, who was speaking in Davos, Switzerland, also praised "the first responders who acted quickly and bravely".
Witnesses at the school described screaming and more than half a dozen shots.
Kevin Janvier, acting mayor of La Loche, said that his 23-year-old daughter Marie, a teacher, was one of the victims at the school.
He also said police had told him that the gunman first shot two of his siblings at home and then made his way to the school.
Canada's gun laws
- To buy a gun or ammunition, Canadians must have a licence under the Firearms Act, which requires a safety course, a waiting period and background checks
- There are three classifications of guns: non-restricted - shotguns and rifles, commonly used for hunting; restricted - certain handguns and some semi-automatic long guns; and prohibited - most handguns, fully automatic firearms, converted automatics, firearms with a sawed-off barrel, and some military rifles like the AK-47
- In 2012, the government of Canada ended the Long Gun Registry, a database linking guns with their respective owners - this means gun owners no longer have to register non-restricted or non-prohibited guns
- Canada's gun-related homicide rate (0.5 per 100,000) is about seven times lower than the United States' (3.5 per 100,000). However, Canada's gun-related murder rate is higher than many of its peers, including Japan (0.01 per 100,000) and the United Kingdom (0.06 per 100,000)
- Gun-related crime is highest in the provinces of Saskatchewan and Manitoba, which also report the highest rates of non-gun-related violent crime
'Shock and sorrow'
At a news conference, Maureen Levy, a senior officer at the Royal Canadian Mounted Police (RCMP), said: "There's no risk to public safety at this time. This is truly a tragedy."
She provided no further details.
The RCMP said officers were called about "an active shooter" at 13:00 local time (19:00 GMT) and detained the suspect 45 minutes later, Canada's CBC broadcaster reports.
"Words cannot express my shock and sorrow at the horrific events today in La Loche," Brad Wall, the premier of Saskatchewan, said in a statement.
"My thoughts and prayers are with all the victims, their families and friends and all the people of the community."
About 900 students attend La Loche Community School for kindergarten through to grade 12 (the last year of high school).
"I ran outside the school," Noel Desjarlais, a Grade 10 student, told CBC.
"There was lots of screaming, there was about six, seven shots before I got outside. I believe there was more shots by the time I did get out."
La Loche is an aboriginal community of about 3,000 people.
It is located nearly 900km north of the provincial capital, Regina.