Once an engine of job creation, South Africa's mining industry faces soaring costs, labour unrest and falling production that is threatening other mines with closure.
The social consequences will be huge as much of the mine labour force, drawn from rural areas far from the shafts, is illiterate and will be hard pressed to find work elsewhere.
This labour force, which generated vast profits for the industry, is now the sector's undoing as low skill levels constrain productivity, while income disparities fuel pay demands.
With all mines employing a third fewer South Africans than before the end of white rule two decades ago – while the population has grown by over 40% since 1990 – decline in the industry is not new, especially in the gold fields.
But at a time of mounting public disillusion with post-apartheid rule by the ANC, mine owners trying to cut costs find themselves caught between a government keen to shore up its support and a labour force struggling to survive on low pay but desperate not to lose jobs altogether.
Even a low-wage, dangerous job in the shafts has historically been a step up from subsistence farming in the marginal rural areas where black South Africans were forced to eke out an existence during white rule.
Today's mine labour force continues to reflect that.
"It's sad that the mining industry today still draws its labour force from rural and illiterate communities," Mineral Resources Minister Susan Shabangu said at a mining conference in Cape Town this week.
Now, even those grim opportunities are vanishing at a time when unemployment is officially around 25% but widely reckoned to be far higher. The mining sector is the country's second largest employer after agriculture.
"We will all have to accept the fact that the traditional way of mining in South Africa with its reliance on cheap, low-skilled and plentiful labour is over. It is not sustainable," Mamphela Ramphele, chairperson of world number four gold bullion producer Goldfields, told the conference on Wednesday.
Gold mining has already been partly mechanised because of the depths of the shafts, which run up to 4km deep.
Geological challenges constrain platinum's mechanisation.
South Africa sits on 80% of the world's known reserves of the metal used for catalysts in cars. But the sector's margins are being squeezed after a period of growth.
The World Gold Council says the country's share of global gold production has fallen from 70% in 1980 to around 8%, knocking its ranking from first to sixth place.
According to South Africa's Chamber of Mines, the number of gold miners has plunged from around 490 000 in 1990 to 145 000 in 2011. Across the industry as a whole, the sector shed a third of its workforce over that period, from 780 000 to 513 000.
Other sectors such as coal have also lost jobs but platinum mines added about 100 000 jobs over the same period to 195 000. As Anglo's troubles show, that trend seems to be reversing.
Platinum's role in creating jobs to offset losses elsewhere helps explain why the government, unions and the ANC reacted so fiercely to the Anglo plan to mothball two mines run by its Anglo American Platinum unit, Amplats, the world's top producer of the precious metal, and to cut the 14 000 positions.
Anglo's outgoing chief executive Cynthia Carroll said this week the company planned to press ahead with the restructuring despite government objections; Shabangu has toned down her criticism, saying she was "happy" with talks on the issue.
Analysts say more jobs will likely go and Anglo has said Amplats, which had its first loss last year, needs to take drastic measures now to preserve its 45 000 remaining jobs.
"We have lost control of our costs but we never seem to get productivity increases. The sector will battle to hold on to the jobs it has," said Peter Major, a mining consultant at Cadiz Corporate Solutions in Cape Town.
"The future trajectory of mining is being largely impacted by Eskom increases that we can't afford," said chief executive of Goldfields Nick Holland.
"Much to our horror now we find that we are going to have to pay the same sort of increases again for another five years when we thought this was it," he said.
David Davis, mining investment analyst at SBG Securities, says in three years' time, the gold price will have to be at least $1 750 an ounce for most bullion mines in the country to remain profitable because of expected cost increases. The spot gold price is currently around $1 675.
Platinum is $1 728 an ounce and only breaks in South African production are supporting the price, which has been depressed by low demand, especially from Europe. It remains well off a peak of $2 290 an ounce reached almost five years ago.
But the average South African mineworker has around eight dependents and basics like food prices have risen faster than general inflation, sharply eroding workers' real incomes.
Miners are also coming off a low base, with workers at the bottom end of the scale earning some R4 000 a month.
This helps explain the violence and the pay hikes of 50% or more that workers have been demanding, and the rise of the militant Association of Mineworkers and Construction Union, which now has more platinum miners than the dominant National Union of Mineworkers.