(CNN) A national day of mourning has been declared in Liberia after the death of 27 children in a fire at a religious boarding school outside the Liberian capital Monrovia, an official said.
The children were sleeping in a building attached to a mosque at an Islamic school in Paynesville City when it caught fire on Tuesday at around 11 pm Liberia time, Presidential Press Secretary Isaac Solo Kelgbeh said.
The children, some as young as 10, were not able to escape the building because there was no fire exit and there were security steel bars on the windows, Kelgbeh told CNN.
Authorities said the fire broke out at the main entrance of the building, leaving its occupants trapped inside.
Two teachers are also among the dead. While two survivors were taken to a local hospital and remain in a critical condition.
Liberia's President George Weah visited the site Wednesday morning and said: "I was touched by the terrible news and decided to rush here to see for myself the families of the children and the community leadership to extend my sympathy."
"It is saddening even when a single citizen dies; what much more about 28 children, potential leaders, who were aspiring for a better and prosperous future," he added.
The President said he will launch an investigation into how the fire started.
The victims were buried on Wednesday in line with Islamic funeral rites, which states that a person must be buried as soon as possible after they die, often within 24 hours.