At least 20 dead after children caught in Nigeria school collapse

The wreckage of the building in Lagos Credit: Sunday Alamba/AP

Twenty people have been confirmed dead in a school building that collapsed in Nigeria, most of them children.

Lagos state health commissioner Jide Idris said 43 other people were rescued alive.

Officials have said the three-storey residential building had been marked for demolition and the school was operating illegally on the top two floors.

Footage showed rescuers carrying several dust-covered, stunned-looking children from the debris, to cheers from hundreds of people who had rushed to the scene.

The building had been earmarked for demolition and the school was operating illegally. Credit: AP

A number of shirtless men - hacksaws and mallets in hand - were seen to jump in to offer help to the rescue workers.

Rescue crews halted their search on Thursday, to the anger of some at the scene, saying they had reached the building’s foundation without finding any other victims.

Building collapses are common in the west African nation, where new construction often goes up without regulatory oversight.

Adeyemo Sunday, whose family lived on the building's second floor, was thankful one of his sons survived but was mourning the other, who died in the collapse.

He said he sent his boys to school in the building where they lived there so they wouldn't have to travel far.

Several children were rescued from the wreckage. Credit: AP

Another parent, Yewande Ogunsanwo, said her son remained in critical condition.

"Let's thank God for God, he's getting better but his condition is so critical," she said, adding: "The pain is too much."

The collapse comes as President Muhammadu Buhari, newly elected to a second term, tries to improve the distressed infrastructure in Africa's most populous nation.