Police in Norway say a teenager has confessed to stabbing both a student and a kindergarten teacher walking her dog.

Investigator Terje Kaddeberg Skaar says the 15-year-old Norwegian boy was held on preliminary murder charges for the Monday stabbing of 14-year-old Jakob Abdullahi Hassan and Tone Ilebekk, a 48-year-old woman.

Kaddeberg Skaar said Wednesday the suspect knew Hassan while Ilebekk could have been a random victim, adding that a motive for this "tragic case" was not immediately clear.

He said the suspect gave "a detailed explanation," adding police do not believe others were involved in the stabbing in Kristiansand, southern Norway.

The suspect was arrested Tuesday and was placed in the custody of social services. He faces a pre-trial hearing Wednesday.