At least 26 children were killed on Wednesday in a fire at a Koranic school near the Liberian capital Monrovia.
Two teachers also died in the blaze overnight, the president’s office said, citing information from the emergency services.
President George Weah visited the site in Paynesville, on the outskirts of the capital, and said the cause was still unknown.
“We are here to encourage parents of the victims to have strength, because it is painful to lose your kids in this manner,” Weah told reporters.
“We extend our sympathy to the bereaved families. We don’t know the cause of the fire yet, but we will encourage our investigators to find how it happened,” he added.
Rescuers in white masks and surgical gloves carried the children’s bodies in bags from the burnt-out building as crowds of people and relatives crushed together outside.
The sheet-metal roof of the building, which housed a school and boarding school, was destroyed.
“I was sleeping when I heard noise outside. My wife opened the back door and we saw smoke coming from the front. We came out and saw heavy fire at the back,” said local resident Zazay.
Another resident, Ballah, whose home is near the school, said they helped in the rescue efforts.
“We went for water, trying to put it out. We were putting water up to 2.30 am. When the fire fighters came, the fire was already going down.”
“We do not know the cause of the fire,” he said.
The fire struck while the children were asleep, said Fulani community official Amadou Sherrif.
In an earlier tweet, Weah offered condolences to the families of those affected.
“My prayers go out to the families of the children that died last night in Paynesville City as a result of a deadly fire that engulfed their school building,” he wrote.
“This is a tough time for the families of the victims and all of Liberia.”