Police in northern Germany say they have detained a 17-year-old boy with several knives after being tipped off to an online chat in which someone threatened to kill several people at a school.

Officers checked students entering the school in Flensburg, just south of the Danish border, on Wednesday morning and detained the German teenager. Police said initial investigations firmed up suspicions against him, without elaborating. The chat surfaced on Tuesday evening and the threat applied to Wednesday.

Lessons were held as normal after boy was detained.