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).
Chief Oeyvind Aas said a suspect had been caught and seemed to have acted alone.
Police will investigate whether it was an act of terror, a spokesman said.
"It is a tragedy for all those affected," Mayor Kari Anne Sand told VG newspaper. "I have no words."