Seven Kenyan teenage schoolgirls died and 10 more were hospitalised after a fire engulfed their boarding school dormitory in Nairobi early on Saturday morning, a government official said.

The cause of the fire was not known, and the government ordered Moi Girls School closed for two weeks while it investigated, education minister Fred Matiangi told reporters when he visited the school.

"A fire broke out at the school at 2am in the morning in one of the dormitories," said Matiangi. He said the school, which has nearly 1,200 students, is "one of our top schools in the country and... (one) that we are very proud of."

Fires have in the past claimed the lives of dozens of Kenyan boarding school students. In 2001, 58 schoolboys were killed in a dormitory fire at Kyanguli Secondary School outside Nairobi. In 2012, eight students were killed at a school in Homa Bay County in western Kenya.

Lax safety standards and poor emergency procedures have been blamed for some past fires at schools and for other tragedies such as the collapse of a residential building in Nairobi in May that killed nearly 50 people.

The Kenyan police did not immediately respond to a Reuters request for comment on Saturday morning.

A shaken 16-year-old schoolgirl, Daniella Maina, told Reuters: "We were sleeping and a girl woke us up and said that our hostel was burning. We were helped to safety by some teachers."

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.