Police first received word of an attack in the town of Kongsberg, south-west of the capital Oslo, at around 18:13 local time (16:13 GMT).
A Danish man aged 37 has been arrested on suspicion of carrying out the attack.
Police believe he acted alone, and will investigate whether it was an act of terrorism, a spokesman said.
Prime Minister Erna Solberg said reports of the incident had been "horrifying".
"I understand that many people are afraid, but it's important to emphasise that the police are now in control," she told a news conference, as quoted by Reuters news agency.
The attacker is said to have launched the assault inside a Coop Extra supermarket on Kongsberg's west side. One of those injured was an off-duty police officer who was in the shop at the time.
A spokesperson for the chain later confirmed a "serious incident" at their store, adding that none of their staff were physically injured.
There was reportedly a confrontation between the attacker and the police before he was eventually detained at 18:47 local time.