At least 10 people have been killed and many others still trapped after a building housing a school and apartments collapsed Wednesday in Lagos, Nigeria.

The three-story building collapsed in a place called Ita Faji, a densely populated area, around 10:00 local time.

Shocked residents, onlookers and parents raced to the site to initiate rescue efforts before emergency workers had arrived.

“There is a Primary school inside from Primary one to Primary six. Both small kids and their teachers are there too,” said Babatunde, a local resident involved in the rescue.

The school had 172 registered pupils. Local officials said it was difficult to give accurate casualty figures as the rescue operation was still ongoing.

Rescued victims were sent to The Lagos Island General Hospital for treatment where 41 people were confirmed to be in a stable condition.

The building had been marked three times for demolition, according to Lagos state building officials.

The exact cause of the collapse is yet to be ascertained. A government official said a thorough investigation into the incident will be launched.

Building collapses often occur in Lagos as some property developers fail to adhere strictly to building laws and regulations. In most cases, heavy loads are placed on buildings and inferior materials often used in construction work.