The building was under construction when it collapsed at about 1pm local time on Friday along a busy commercial street in Nairobi's Eastleigh area, which is often crowded with thousands of traders and residents.
Nairobi police chief Issa Mohamud said the building had more than 10 upper floors under construction. Rescue operations were complicated, with police firing tear gas at people who had begun looting neighbouring shops, as officers sought to clear the area and provide access to emergency response teams.
Joseph Kaula made it out just in time. A plasterer working on the fifth floor, he said he heard screams and spotted other workers rushing outside, shouting that the building was collapsing.
"I was the last person to walk out before it collapsed and the whole area was filled with dust," Kaula said.
Kaula suspects a few of his colleagues were trapped in the basement.
One injured woman was rescued and hospitalised, and another person who was crying for help had gone silent, the police chief said.
Mohamud also warned of a possible secondary collapse, as the collapsed building was leaning on its neighbour.
Residents said some of their loved ones who were trapped had made phone calls calling for help immediately after the collapse, but that their phones later became unreachable. A tent was set up where people could report the missing. How many might be inside the wreckage wasn't known.
Building collapses are a recurring problem in Nairobi. County officials responsible for issuing building permits have been accused of failing to conduct adequate inspections to ensure developers comply with safety guidelines and construction standards.
"Investigations will be carried out," Mohamud said. "We'll make sure people face the law for any negligence."