Police announced an incident in the town of Kongsberg south-west of the capital Oslo at around 18:30 local time (17:30 BST).
“The man has been apprehended … from the information we now have, this person carried out these actions alone,” police chief Oeyvind Aas told reporters on Wednesday.
Chief Oeyvind Aas said a suspect had been caught and seemed to have acted alone.
The suspect reportedly moved throughout the town, and authorities have cordoned off several large areas.
Media reports say the attacker opened fire at a Coop Extra supermarket on Kongsberg's west side. Residents were ordered to stay indoors.
The suspect has now been taken to a police station in the town of Drammen, police said.
Following the attacks, the police directorate said it had immediately ordered officers nationwide to carry firearms. Norwegian police are normally unarmed but officers have access to guns and rifles when needed.
Police urged the public to stay at home and several neighbourhoods were cordoned off, with television footage showing ambulances and armed police in the area.
A helicopter and bomb disposal team were also sent to the scene.