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 and wounded three others, in what the authorities said was an apparent act of terrorism.
The police identified the suspect in the grisly assault in the town of Kongsberg, about 50 miles southwest of Oslo, as Espen Andersen Brathen.
“The incidents in Kongsberg currently appear to be an act of terrorism,” the Norwegian security agency, known as PST, said in a statement. It added that investigators were still trying to determine precisely what motivated the attacker.
Many flags across the normally bucolic town far from the bustle of the capital flew at half-staff, and grief-stricken residents placed candles and flowers at a makeshift memorial in the town square.
The regional police chief said that the suspect had been known to the authorities. Officials said Thursday that the assailant was a Danish citizen who lived in the town and who had converted to Islam, but did not say when that happened, why his conversion had raised concerns or what action the authorities had taken.
“We have previously been in contact with him regarding worries about radicalization,” Ole Bredrup Saeverud, the regional police chief, said at a news conference before the suspect was named. Asked whether the assailant 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.
Some of the victims were also found inside private homes, Ann Iren Svane Mathiassen, a lawyer with the police, told the broadcaster NRK. “We have information about the perpetrator making his way into houses and committing the murders there,” she said.
Mr. Bredrup Saeverud, the police chief, said that the last time concerns about the suspect’s radicalization had been brought to the attention of the police was last year, but he did not say who had contacted them with those concerns, or specify their nature. He said only that the police had followed up on multiple reports.
Mr. Brathen 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 ages of the five people killed ranged from 50 to 70, Mr. Bredrup Saeverud said, adding that the three people wounded 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. 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.
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.