NAIROBI, KENYA -- A six-storey residential building collapsed Friday in Kenya's capital, officials said, with at least four people killed and others trapped in the debris. The scene was all too familiar in a city where an audit once found more than half of buildings unsafe for habitation.

Associated Press video showed people cheering as one dust-covered person was carried away on a stretcher, arms outstretched. Shortly afterward the crowd hushed as another person was carried away but covered completely by a blanket. Workers listened for voices from the rubble.

Nairobi county police chief Philip Ndolo said 21 people had been rescued, with some searchers using their bare hands to pick through the debris. Eight people were taken to a hospital, Nairobi regional commissioner Wilson Njenga said.

"Tragedy has struck us again," public works official Gordon Kihalangwa said. "Some people have been trapped inside and we are doing our best to free them."

It was not immediately clear what caused the morning collapse. Njenga said 57 rooms had been rented out in the building. The Red Cross said 22 families lived there. Njenga said the building's owner was "not available" and not living there.

Hundreds of people gathered to watch from nearby buildings as emergency responders prodded at the pancaked concrete structure, with little space remaining between the floors. Njenga said any excavation could cause more damage if anyone alive remained in the ruins but an excavator later began scraping at the site and a jackhammer could be heard.

Medical workers set up an impromptu centre in tin-roofed stalls nearby while a line of ambulances waited, racing away one after another along the muddy street.

Building collapses are common in Nairobi, where housing is in high demand and unscrupulous developers often bypass regulations.

After eight buildings collapsed and killed 15 people in Kenya in 2015, President Uhuru Kenyatta ordered an audit of all the country's buildings to see if they were up to code. The National Construction Authority found that 58% of buildings in Nairobi were unfit for habitation.