Police were still at the school, which was not named but is located in a western part of the city in the quiet and affluent Blankenese district.
Pupils and teachers had been asked to lock themselves in their classrooms in the late morning, the TV channel ARD said, according to Reuters, but police did not immediately confirm this.
MNA