"Our estimate is that about 80 percent of students and teachers fled the city during the fighting," a civil society source involved in education told IRIN.
He said his group had established that 43,194 school-going children in 88 schools had been affected by the fighting between Ethiopian-backed government forces and insurgents. He said the exodus had forced education authorities to close most of these schools, leaving only a fifth operational.
According to United Nations estimates, at least 1,000 people died and 4,000 more were wounded in the fighting. Another 365,000 were displaced. A medical source told IRIN that about 40 percent of the wounded who made it to hospitals were children. "Most of them were school-age," he added.
A group of UN agencies and non-governmental organisations dealing with education, known as the Education Cluster, said the fighting in Mogadishu had paralysed the education sector.
"Over 70 percent of primary and secondary schools were closed as children fled the city with their parents," the group said in a recent report.
Troops had also occupied educational facilities such as the University of Mogadishu, displacing at least 1,500 students, the group added.
However, the government said on Tuesday that most students had returned and were resuming their classes.
"Most have returned and the schools have reopened," Information Minister Madobe Nuunow Muhammad said.
Calling upon teachers and students who have not returned to do so, Muhammed added that the government would set up a taskforce to assist all returnees, including students. "We will do everything we can to bring normality back to the schools."
Another civil society source told IRIN that most students who returned were now sitting their exams.
"It is exam time and they and their parents want to make sure they don't fall back," the source said.