Eskom crisis: Why the lights keep going out in South Africa
South African homes, offices and businesses have endured a week of daily power cuts, designed to prevent a total collapse of the overstretched electricity grid.
The use of scheduled blackouts, or load shedding, is not new in the country - but the latest round has been the most disruptive yet, sparking a public outcry. As the state-owned power utility, Eskom, battles to meet demand, it has warned that it could run out of money by April, defaulting on its vast debt.
Eskom is one of the biggest power utilities in the world, while South Africa is the most-industrialised country in Africa.
The crisis at the utility poses a huge threat to the economy and to the political survival of President Cyril Ramaphosa, who faces an election in May.
The latest round of rotating blackouts has been attributed to maintenance issues at Eskom power stations. However, this is not the first time the utility has resorted to load shedding. Similar measures were introduced late last year, as well as in 2008 and 2015.
In fact, the current crisis is the result of a perfect storm in which rising costs, falling revenues, crumbling infrastructure, and decades of corruption and mismanagement each play a part.
Eskom generates almost all its electricity from coal, an abundant resource in South Africa. Its fleet of coal-fired power stations were producing more than enough energy to meet the country's needs when white-minority rule ended in 1994.
Demand soared after that, driven by rapid economic growth and by the extension of coverage to deprived black townships. The BBC's Milton Nkosi in Johannesburg says Eskom acquired millions of consumers in the post-apartheid years, but its expansion was hindered by mismanagement and corruption.
Swift action was needed to feed the grid, but none was taken. Only with shortages looming in the mid-2000s did the government announce a costly overhaul, including plans for two huge new power plants - Kusile and Medupi.
Kusile and Medupi were meant to have become fully operational by 2015, but their construction has been beset by spiralling costs, delays and corruption scandals.