More than 10,000 learners have been ordered out of dilapidated schools ordered shut by the government in a countrywide crackdown on unsafe institutions.
Education officials have ordered more than 300 primary and secondary schools shut and asked parents to enrol their children in public schools near their homes.
Cabinet Secretary George Magoha ordered an audit and the closure of unsafe and unregistered schools countrywide two weeks ago, but the directive has faced resistance from the same people whose children it was intended to protect.
And Education Principal Secretary Belio Kipsang issued a circular directing officials to assess the infrastructure in schools and "make appropriate decisions" by October 25 and submit a report to him by October 31.
The resistance to the closures from parents and other stakeholders has lifted a lid on issues influencing education in informal settlements.
"This circular is an emotive reaction to a terrible tragedy which is understandable, but is not a good basis for making effective policy decisions," Mr Allan Juma Masika of the Kenya Alliance of Non-Formal Schools Welfare Association said.
Nairobi regional Director of Education Jared Obiero acknowledged that though the ministry has directed where the learners should report, not all of them have done so.
"We cannot force the parents to take them there. It is their democratic right to school their children but the environment must be safe. If it is not, we'll close the schools," he told the Nation by phone.
The crisis has been compounded by congestion in many public schools, especially in urban areas.
Parents have complained about long distances to the schools, which are also grappling with a biting teacher shortage that has plagued the sector for years. The Teachers Service Commission has announced plans to engage interns in an attempt to plug the gap.
The directive to close non-compliant schools was a reaction to the tragedy that befell Precious Talent Top School, off Ngong Road in Nairobi, on September 23.
Eight learners were killed and 69 others injured when a classroom block collapsed. The owner of the school, Mr Moses Wainaina Ndirangu, has since been arrested.
He was arraigned on September 27 and detained for 15 days for police to complete investigations.
Learners at the school were relocated to neighbouring public primary schools -- Ngong Forest (480), Jamhuri Primary (180) and Riruta Satellite (130).
When the Nation visited the ill-fated school on Friday, eight children were learning outside the classrooms on their own.
"The private schools in this area are supported by foreign donors. The children get free things like lunch and uniforms. Closing the schools means the parents will have to cater for those needs," the headteacher of a public primary school in Dagoretti South told the Nation.
The owners of the schools, the teacher said, use the poor infrastructure at the schools and poverty of the learners to attract donor funding.
"There are hundreds of these schools in Dagoretti and Kawangware." Most of them are squeezed into tiny plots and do not even have playgrounds or trained teachers.
But parents have shunned government schools with better infrastructure, spaces and qualified teachers.
Pama Academy in Kangemi, which was closed last week, is only 800 metres away from two public schools (Kihumbuini and New Kihumbuini primary schools).
Prof Magoha directed that learners be moved to the public schools. He warned, without elaborating, that "we will not allow people to trade with our children", while calling for more scrutiny of NGOs that operate in informal settlements.
"We are not condemning private schools. Any private school that conforms to the standards that the government has put will be allowed to operate," Prof Magoha said after closing Greenfields Academy in Mombasa.
He admitted to failure by his ministry in inspecting and registering schools, saying "eight children died out of the carelessness of all of us".
A visit by the Nation to the public schools revealed that the few pupils who have reported are integrated well. "The children and even the parents are very happy. They are settling in well," said Mrs Muchiri, the headteacher of Riruta Satellite Primary School.
The school had received over 50 new learners from Precious Talent Top School and a few other private schools.
She said that the learners are counselled together with their parents and an integration session held for them in the classrooms.
Parents who spoke to the Nation said they prefer private schools because they are near their homes and have fewer learners.
They also said that private schools perform better than public schools in national examinations. Where the schools have donors, the learners are fed well.
The government has been blamed for the poor school infrastructure. In Nairobi, for example, according to a report by a task force commissioned by former Governor Evans Kidero in 2014, there were only 205 public schools serving 193,053 children yet the primary school-going population was estimated to be 493,586 in 2012 and 596,868 in 2017.
This means that more than half of the eligible population is either in private schools or are out of school.
"After the feeding programme was stopped, many children went back to the streets. This was the only place they could eat. We even used to pack food for some of them to carry home," a teacher in Kawangware said.
He explained that the programme, funded by Feed the Children, was withdrawn after a dispute with the government.
Poor performance and overcrowding in public schools have also been attributed to the rise in private schools, with parents willing to pay more for their children to earn better grades.
Not all schools in informal settlements offer free services and some charge over Sh20,000 per term. The lure of the grades then obscures the safety of children.
"The parents don't care about the methods employed to get these abnormal marks. There is a lot of drilling and the learners later struggle when taken out of that environment. That is not learning," Mrs Muchiri said.
At Ngong Forest Primary School, over 70 learners have reported. The school will serve as the examination centre for Kenya Certificate of Primary Education candidates.
The ministry has sent textbooks and exercise books for use by the new students. The administration has already started a feeding programme for all the learners.
A lobby comprising the Kenya Alliance of Non-Formal Schools Welfare Association, Kenya Independent Schools Association and Complementary Schools Association of Kenya has opposed the mass closures, saying the action will leave more than two million learners in informal settlements without an education.
Through a statement signed by Mr Allan Masika, Mr Charles Ochieng' and Mr Charles Ouma, the officials claimed that some parents were being asked to pay a fee before the learners were admitted.