An attacker armed with a knife stabbed and killed one woman and wounded another five people at a library in the Canadian city of Vancouver on Saturday, police said.
Although the motive for the attack was not immediately clear, police said they had arrested a suspect who had a criminal record and was believed to have acted on his own.
The suspect was expected to be questioned by detectives later in the evening.
"We know -- we believe we know -- the who, the what, the where and the when. It is our job now to determine the why," said Sergeant Frank Jang of the Vancouver police department.
"We haven't spoken with him yet, but our suspect has had police interactions in the past. He has a past criminal record," Jang told reporters at the scene of the crime.
The stabbings took place in the afternoon in and near the library in an upscale neighborhood of the Pacific coast city.
Andrew Cocking, who lives 500 meters (about a quarter-mile) from the library, told AFP the area where the attack took place was generally very quiet.
"I saw people getting tended to by paramedics, they were being given first aid next to a vehicle and also next to a restaurant, and pulled away on stretchers," he said.
"It was quite sad, especially because apparently one of them was a child," he said, adding that his father was at the library just 30 minutes before the attack.
The CTV network broadcast a video apparently showing the arrest of the suspect, who seemed to stab himself in the leg before collapsing and being detained by several police officers.
Witness Sheila Dyson told CTV she saw a man stab a woman. There did not seem to be any connection between them, with the attacker appearing to strike randomly, she said.
Justin Prasad, another witness who works across the street from the scene of the attack, said he was stunned by what had happened.
"It's shocking -- for me, it was tough to see and tough to deal with," Prasad told AFP.
"After he did the stabbings by the library, essentially chaos ensued; I saw him standoff with police, he fled the scene and the police started chasing him, cornered him and brought him to the ground.
"It was kind of surreal, especially the fact that it was completely random -- now that one person has died, it's really hitting home. This community itself is so quiet, you wouldn't think something like this would happen there."
The local member of parliament said the scene of the attack was a centerpiece of the local community.
"This library has been a secure place for families to gather in the Lynn Valley community for years. Until today, it was unimaginable that such a senseless act of violence could have occurred in the very heart of it," said Jonathan Wilkinson.
Prime Minister Justin Trudeau tweeted his condolences to those affected, saying: "My heart is in North Vancouver tonight."
"To everyone affected by this violent incident in Lynn Valley, know that all Canadians are keeping you in our thoughts and wishing a speedy recovery to the injured."