Police spokesman Bjoern Reusch said the suspect didn't use his weapon and nobody was hurt when he briefly appeared inside the school in Esslingen, near Stuttgart. He probably fled on a motor bike, they later tweeted.
The Friedrich Ebert School was put under a security lockdown for a time Monday morning and all students had to stay inside their classrooms while officers searched the building. Other schools and kindergartens in Esslingen were also under lockdown, but eventually all children were allowed to leave and join their parents.
Police described the suspect on Twitter as wearing a blue T-shirt and light shorts. Local and federal police were looking for the suspect with helicopters and also blocked some streets in the city. Police did make one arrest, but said they quickly realized they had the wrong man.