Police were called to the centre of Kongsberg, southwest of Oslo, after the attack began at around 6.15pm on Wednesday.
Five were killed and two others remain in intensive care, including an officer who was off duty and inside the shop where the attack took place, police said.
“The man who carried out the act has been arrested by the police, and there is no active search for more people. Based on the information we have, there is one person behind this,” Police Chief Oeyving Aas said.
In a statement, police said the man charged is a 37-year-old Danish citizen who lives in Kongsberg. No other details have been released. They also said that additional weapons, other than a bow and arrow, were used.
The police chief confirmed there was a confrontation with the suspect when he tried to run away before he was arrested.
Officers said a probe is underway to determine whether the attack was terror related.
Kongsberg’s town mayor Kari Anne Sand told TV 2 that it was “a gruesome incident”.
“There is nothing else to say. Now we must try to take care of the inhabitants as best we can.”
The prime minister-designate, Jonas Gahr Stoere, who is expected to take office on Thursday, called the assault “a cruel and brutal act” in comments to Norwegian news agency NTB.
Acting prime minister Erna Solberg described the attack as “gruesome” and said it was too early to speculate on the man’s motive.
In response, police officials said they had immediately ordered officers nationwide to carry firearms. Norwegian police are normally unarmed but officers have access to guns and rifles when needed.
“This is an extra precaution. The police have no indication so far that there is a change in the national threat level,” the directorate said in a statement.
The attacks took place over “a large area” of Kongsberg, a municipality of around 28,000 people 66km (41 miles) southwest of Oslo.
The attacks went on for more than half an hour over a “large area” of Kongsberg, including at a Coop Extra grocery store, the Aftenposten newspaper cited police as saying.
A woman living near the store said she had heard alarms as she was walking home.
“I saw a group of police officers, including one who held several arrows in his hand,” the woman, Marit Hoefle, told the newspaper.
Police attorney Ann Iren Svane Mathiassen told news agency NTB that the suspect was “admitting to the facts of the case”.
“We’ll have to see if he also pleads guilty,” she added.
Defence lawyer Fredrik Neumann said he was “cooperating” with police.
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.
“This very serious situation is of course making a deep impression on Kongsberg and those who live here,” district police chief Oeyvind Aas said.
Investigators are expected to give more details of the incident later on Thursday.
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies