The man, Espen Andersen Braathen. who killed five people with a bow-and-arrow and other weapons in Norway was probably suffering from mental illness, police said on Friday.
The attacker went on a half-hour rampage in the southern town of Kongsberg on Wednesday, assaulting people in the streets and forcing his way into houses and one supermarket.
Police arrested a suspect the same day – Espen Andersen Braathen, a 37-year-old Danish citizen who has lived in Kongsberg for most of his life.
Officers had looked into several lines of inquiry, including “anger, revenge, impulse, illness, provocation,” police inspector Per Thomas Omholt told a news conference.
“The hypothesis that has been strengthened the most in the first days of the investigation is that the background is illness,” Omholt said.
The suspect was being held in a locked “psychiatric institution” and other lines of inquiry were still being pursued, he added.
Four women and one man aged between 50 and 70 were killed in the attacks in Kongsberg, a town and municipality about 70 km (40 miles) west of the capital, Oslo. Three people were wounded including an off-duty police officer.
A student told Reuters how he and his friends shut themselves in his bedroom as the attacker tried to get into his home.
Prime Minister Jonas Gahr Stoere, who took office a day after the attacks, visited Kongsberg on Friday with Justice Minister Emilie Enger Mehl.
“Everyone in Norway, from north to south and east to west, has been deeply touched by what has happened here,” Stoere told inhabitants gathered on the town’s main square, after laying a bouquet of white roses and lighting a candle at a memorial site to the victims.
The death toll was the worst of any attack in Norway since 2011, when far-right extremist Anders Behring Breivik killed 77 people, most of them teenagers at a youth camp.
Police have said Braathen is cooperating with the investigation. Any trial will not take place for months.
Earlier on Friday, a court ruled Braathen could be held for up to four weeks in pre-trial detention.