A 37-year-old man was charged on Thursday in connection with a bow-and-arrow rampage in a small town in Norway that killed five people in what the authorities said was an apparent act of terrorism.
The Norwegian security agency, known by its acronym, PST, said investigators were still trying to determine what motivated the attacker to carry out his grisly assault in the town of Kongsberg, about 50 miles southwest of Oslo.
Earlier, the regional police chief said that the authorities had previously been in contact with the man over concerns that he had been radicalized.
“We have previously been in contact with him regarding worries about radicalization,” Bredrup Saeverud, the regional police chief, said at a news conference. Asked whether the man might have been motivated by extreme religious ideology, he added, “We don’t know that, but it’s natural to ask the question.”
Four women and one man were killed in the assault on Wednesday evening. The attacker, who escaped an initial confrontation with the police, unleashed a volley of arrows at apparent strangers in Kongsberg.
The suspect, whose name has not been released, is a Danish citizen who lived in the town and who had converted to Islam, officials said on Thursday.
The police chief said that the last time concerns about the suspect’s radicalization had been brought to the police’s attention was last year, but he did not say who had contacted them with those concerns. He said only that the police had followed up on multiple reports.
The suspect is expected to appear before a judge on Friday, when the specific charges against him will be made public.
Fredrik Neumann, his court-appointed lawyer, said in an interview that the man was cooperating with the authorities and was undergoing a mental health evaluation. He said the man’s mother was Danish and his father Norwegian.
The five people killed were aged 50 to 70, Mr. Saeverud said, and two people injured in the attack were expected to survive.
It was the worst mass killing in Norway since 2011, when a far-right extremist killed 77 people, most of them teenagers at a camp.
On Thursday, the police offered new details about the attack, which Prime Minister Erna Solberg called “terrifying.”
The first call to the police came at 6:12 p.m., with witnesses describing a scene of chaos and unprovoked violence at a supermarket in Kongsberg, a former silver mining village.
One woman told the local news outlet TV2 that she had seen people hiding from a man standing on a street corner with “arrows in a quiver on his shoulder and a bow in his hand.” As he shot the arrows, she said, people ran for their lives.
Six minutes after the first call came into the police, officers confronted the attacker. He fired arrows at the officers and escaped.
At one point, the attacker crossed a bridge spanning the Numedalslagen River and cut through the town, a bucolic area that serves as an escape for people seeking refuge from the bustle of Oslo.
As he made his way through the town, he attacked people seemingly at random, according to the police. One of the injured was an off-duty police officer, and a photo of him with an arrow in his back was circulated widely online.
The police on Thursday asked the public to “please stop sharing photos,” saying that doing so was “unwise and disrespectful.”
The police said the attacker had used a second weapon in the rampage, though they did not offer further details. But it was the arrows that marked the trail of devastation.
At 6:47 p.m., the police detained the suspect — 35 minutes after the first reports of violence.
A police lawyer, Ann Iren Svane Mathiassen, told TV2 that the suspect had lived in the town for several years.
Murder is rare in Norway. In a country with a population of just over five million, there were 31 murders last year, most involving people who knew each other.
Still, the nation has yet to fully reckon with the trauma of the devastating 2011 mass killing.
The Norwegian authorities have expressed concern that not enough is being done to root out right-wing extremism, especially among young people. In July, analysts with the country’s intelligence services warned that a decade after the 2011 attack, there are young men and boys who idolize the gunman.
Norway has stringent gun-control laws, and before that attack the country had experienced only one mass shooting: In 1988, a gunman killed four people and wounded two others.
In the past decade, the Norwegian authorities have stepped up their efforts to stamp out terrorism and political violence. That push has included an “action plan” that outlines preventive measures aimed at spotting and quelling the kind of radicalization that could lead to violence.
A key part of the effort is reaching out to people who are brought to the authorities’ attention, starting with what is generally referred to in the country as a “conversation of concern.”
As the fallout from the latest attack reverberated, a new center-left government was being sworn in on Thursday morning.
Jonas Gahr Store, the Labour Party leader who was installed as prime minister, said at the ceremony that “what has happened in Kongsberg is terrible.”
He promised a full investigation.