Panicked students along with their teachers came out to survey the damage after a fire gutted a dormitory at the Ofafa Jericho high school in Kenya's Nairobi county.
About 40 students were hospitalised after inhaling smoke in the Monday night disaster.
"Most of the students actually who were taken to hospital, they were attended to and they were actually returned back to school. The few who are in hospital, we have also talked to the hospitals and they have assured us that they are in stable condition," said Mathews Linge, the school's principal.
He said the students inhaled smoke as they helped to put out the fire.
The blaze destroyed personal effects belonging to the students.
Medical authorities said most of the hospitalized students were suffering from breathing complications but that they suffered no burns.
The cause of the fire was not immediately known and members of the Nairobi County department said investigations would commence at day break.
Shool fires are common in Kenya. Authorities have blamed arsonists and poor safety protocols.
Kenya: Virtual reality used to teach students about plastic pollution
Russia seeks to bolster ties with Kenya as Lavrov meets Pres. Ruto
Kenya's Ferdinand Omanyala sets 100 metre world lead for the year
Kenya: King Charles' III coronation divides
The Kenyan Café welcoming people with cognitive disorders
Coding classes for children in Nairobi's Kibera district