The outage came after a major electricity pylon belonging to Kenya Power fell over. Kenya Power is the sole energy distributor in the country.
Kenya was experiencing a nationwide blackout on Tuesday after a high-voltage energy pylon fell over, Kenya Power said.
"We have lost power supply due to collapsed towers on Kiambere-Embakasi high voltage transmission power line," Kenya Power said in a statement on its Twitter account.
"Our engineers are working to restore electricity supply as the repairs are being undertaken."
State-run Kenya Power is the sole energy distributor in the country. The bulk of its power comes from one source, Kenya Electricity Generating Company (KenGen).
Later in the day, the firm issued a second statement saying that power had been restored to Nairobi, West Kenya, North and Central Rift and South Nyanza. They said they hoped that everything would be back up and running across the rest of the country soon.
Although widespread blackouts are relatively common in Kenya, they do not usually affect the whole country of 54 million people.
A notable exception was a May 2020 outage that came as the result of a broken section of a high voltage power line that transmits power to Nairobi from the Olkaria geothermal power plants, some 75 kilometers (45 miles) from the capital.