BAGHDAD (Reuters) - Even after clashes erupted in the Sadr City slum in Baghdad, Thamir Saadoun still tried to go to school, hoping it would be open. When he got there the guard told him to go home. That was more than two weeks ago.
"I miss my friends. I haven't seen them for weeks, I want to play with them," said Saadoun, 12.
"I am fed up from sitting at home. I want to return to school to study and to be a doctor, to treat wounded people in the future if attacks happen."
The education system in Iraq, once the envy of the Middle East, is now in tatters.
Violence, a collapse of school infrastructure and the mass displacement of both pupils and teachers have turned many of Iraq's schools into fetid overcrowded ruins, jeopardizing the futures of millions of children like Saadoun.
At the end of the 1980s, after pouring oil money into schools, Iraq had virtually eliminated illiteracy.
But after two decades of economic sanctions and war, one third of Iraqi adults now cannot read, Education Minister Khodhair al-Khozaei told Reuters.
"It is a problem that cannot be fixed by a magic wand. We need more than 4,300 new schools, existing schools are in bad condition and the population is growing," he said.
No part of Iraq shows the severity of the crisis more than Thamir's neighborhood, Sadr City, a vast east Baghdad slum with an estimated 2 million people and more than 500,000 school pupils but just 260 school buildings, many barely usable.
Its neighborhoods have been a battle-zone in the past few weeks, as security forces have fought the Mehdi Army militia of Shi'ite cleric Moqtada al-Sadr. U.S. attack helicopters constantly hover overhead, hunting gunmen.
In many cases two or even three "schools" operate out of the same school in the slum, using the classrooms in shifts staggered throughout the day.
Hundreds of thousands of people moved into the rapidly expanding Shi'ite slum in the 1990s and few new schools were built for them.
"There is no balance between the continuous growth of the population and a number of schools that is almost fixed," said Mohammed al-Moussawi, head of the education directorate for east Baghdad.
On a recent visit to the al-Khaldiya Primary School in Sadr City, raw sewage was seeping onto the ground from blocked and leaky pipes, filling classrooms with an oppressive stench.
Three separate "schools" share the same 12-classroom building -- about 1,600 pupils in total -- arriving in morning, afternoon and evening shifts.
"The school is crowded and in constant need of repairs," said headmaster Ali Abid Sulaibi. "The most important thing is the plumbing. The pupils' toilets are closed because of the bad sewage, and there is no running water."
At the al-Fadhila secondary girls' school nearby, 50-70 teenage girls are packed into each classroom, with three at each desk that is supposed to seat two.
"How can they understand and cooperate with the teacher inside the classroom?" said English teacher Maani al-Yassiri.
After years of violence and upheaval, 2.7 million Iraqis are displaced within the country and 2.4 million have fled abroad, according to the International Organisation of Migration.
Schools in violent areas have shut, while schools in safer areas have been overwhelmed with children from displaced families.
"We are left with a simple choice. Abandon these children in the streets to be victims of illiteracy and ignorance, or open our hearts and classrooms despite their being crowded," said Education Minister Khozaei.
At the al-Wathba secondary school for girls in Alawi, a central Baghdad neighborhood seen as safer than other areas, father Abu Sundus arrived with a letter from the Education Ministry giving him permission to enroll his two daughters.
Five days before, gunmen had sprayed his house with bullets. He decided it was no longer safe to let the girls attend their neighbourhood school, so they fled their house.
"My girls were comfortable in their old school. Of course they will be affected. They were used to their teachers, their girlfriends. It is a heavy burden on them to move," he said.
"When I was their age, education was better. The teacher was giving the best that he could give the pupils. Now, how can a teacher do his job and while getting paid only 120,000 dinars a month ($100) which buys just four gas canisters?"
Yet despite all the risks and hardship, parents say their children still beg them to let them go to school: often it is the only opportunity children have to leave the oppressive confinement of homes in a battle-zone.
Thamir Saadoun's father said the boy wouldn't step pestering him to take him to school, even though it was closed because of the fighting in Sadr City.
"We are afraid of snipers but he insists and going to school. He says 'I love school'."
Additional reporting by Aseel Kami; writing by Peter Graff; editing by Sara Ledwith