A five-storey building under construction collapsed in Juja, Kiambu County, on Wednesday night following heavy rains.
Residents said the building came down at 11pm.
"My family and I were asleep when we suddenly heard a thunderous sound of something huge falling.
"When I got out of bed, I was met with a huge cloud of dust...neighbours broke our gate in an attempt to rescue us. They thought we had been hurt," said a resident who lives in a house behind the collapsed building.
Residents said the construction of the building began mid-last year but it had been showing signs of collapse.
They said it had cracks but the owner covered them up.
"We've had many incidents of stones falling from the building. Some cracks could be seen from outside," said resident James Kariuki.
Some residents said some of the bedsitters in the building were already booked and set to be occupied next month.
The building was near the main campus of Jomo Kenyatta University of Agriculture and Technology.