LAGOS, Nigeria — Officials in Nigeria on Friday began demolishing unstable structures on Lagos Island near the site of a deadly building collapse, displacing residents who had little warning that their homes would be destroyed.

The sound of sledgehammers rang out as construction crews fanned out across the area to begin the slow process of tearing down buildings — some marked with a giant “X,” indicating that they were unstable. About 100 structures were to be destroyed, officials said, and scores of people were living in them.

Lagos, the most populous city on the African continent, is known for its poor urban planning, and many Lagos Island residents said they believed they had little choice but to live in the buildings — even those that were visibly listing and scheduled for demolition.

The demolition began two days after the collapse of a three-story building housing a preschool, nursery school, apartments and shops. On Friday, a health official told Reuters that 20 people had been killed and dozens more injured. Many of the dead were children.