"I was on the way to school one day when intense fighting erupted and I had to seek shelter; by the time I got to school there were no students, they could not come because of the fighting," Abdulkadir Abdullahi, a primary-school teacher in Mogadishu, told IRIN.
Abdullahi said even though there were no official figures, many of his colleagues had left the profession due to insecurity.
''We go wherever they are," Ahmed said. "Some days we are teaching under a tree and if we are lucky, under a tent. ''
"It is not only that we have to deal with the constant shelling and general insecurity, but sometimes teachers are specifically targeted for doing what they do by the fighting groups," he said, adding that only those dedicated to their profession remain. "This [teaching] will not make you rich."
He said many teachers were killed just for going to work.
Fighting in Mogadishu, which has been going on for years between government forces and opposition Islamist groups, has escalated in recent months.
A civil society source in Mogadishu, who declined to be named, told IRIN that teachers were targeted because "they are an obstacle to the interests of the fighting groups. The warring sides want to recruit young children and it is hard to recruit a child going to school.”
Parents were often keen on taking their children to school, "just to keep them out of the militias", he said.
In the midst of the chaos and violence, teachers, students and their parents are confronted with a choice of obtaining a semblance of education or giving up altogether.
"There is no predictability to the fighting," Sheikh Mohamed Ahmed, chairman of the Somali Formal Education Network (SOFEN), an umbrella group that brings together 55 schools in the city and three other regions in south and central Somalia, said. "Yesterday you may have had a full school and today you may have no students or teachers because they could not brave the fighting."
He said the schools network had established "emergency education", where teachers follow the population whenever they are uprooted due to the fighting.
Some schools in Mogadishu have been abandoned because they were in a war zone or occupied by fighting groups. Ahmed said 20 member schools were closed due to insecurity.
Adil Ahmed, another teacher in Mogadishu, told IRIN that teaching in the city was unique. "This is the only place I know where you can have a school move to different locations three times in one year," he said.
If an area becomes too dangerous or the situation does not settle down, Ahmed said, the school's authorities look for a location and move. "It is a normal thing in this city. Imagine teaching in that situation or learning."
Ahmed said he was most impressed by the students' desire to learn, despite the traumas.
Since 1990, more than 1.4 million Somalis have been displaced internally, and at least 600,000 are refugees in neighbouring countries.
Source: IRIN News