Reports suggested no one was seriously hurt in the incident.
Police say the man, whose identity has not yet been released, is a former soldier who fought during the 1980-88 war with Iraq and is seeking government support for his military service.
Germany's dpa news agency says the hostage taker surrendered to law enforcement agencies after being given a promise that his demands will be handed over to the authorities.
The man entered Falagh junior high school at around 10 a.m. local time and took 100 pupils and teachers hostage.
Eyewitnesses say he was accompanied by his teenaged daughter.
AFP reports that on coming out of the school, he shouted that he did not care about his daughter or himself "dying."
(dpa, AFP, ISNA)