In Johannesburg, illegal miners and mining companies are in a race to tap golden riches hidden in hundreds of heaps of mine waste, many taller than a 20-storey building.
The hills that scar the city's landscape are now coveted by South African mining companies whose underground gold deposits have become harder to exploit with every passing year.
The region is dotted with slag heaps, shafts and deep trenches left by generations of miners, whose arrival in a gold rush in the 1880s led to the birth of the city.
South Africa has lost its decades-old crown as Africa's biggest gold producer to Ghana, but still has more than 100 active mines, including 44 around Johannesburg.
"Production peaked around 1,000 tons in 1970 and has been steadily declining ever since," said John Reade, the chief market strategist with the World Gold Council (WGC).
By 1993 the southern African nation was producing at around half of its peak rate, just 619 tonnes a year. By 2022 it was at less than one tenth of its 1970 production levels, just more than 90 tons.
Johannesburg was once known as "eGoli" or the "place of gold" but the city and the Witwatersrand region now produce only a quarter of the country's gold output each year.
Painstaking but profitable
But now, a growing amount of gold comes from the hills of waste. Many are decades old and were left when much gold dust and many chunks went undetected as miners searched for richer seams.
Artisanal miners and the illegal mining gangs, whose members are commonly known as "zama zamas", scavenge, recycle, and rework leftover gold ore - often while battling with each other.
In July, five people were found shot dead near an abandoned shaft west of Johannesburg.
Illegal operations also affect active mines, something that mining companies have long complained costs them money and is a threat to their staff.
The "zama zamas" are mainly immigrants who come to South Africa to try to earn money from clandestine pits, living and working in arduous conditions.
"Initially the artisanal miners would go into these tailing dumps and find what they could," said Dale McKinley, a researcher in development studies at the University of Johannesburg.
"And when it was clear that there was a lot of money to be made, the zama-zama syndicates started moving in."
And then the big mining companies, despite abandoning their dumps decades ago, decided to take another look at the waste themselves.
McKinley criticised the mining companies saying they were returning to their waste only "now that the gold industry has gone into doldrums".
Companies like Pan African Resources are buying up the hills in a 21st century gold rush.
The firm says it plans to extract gold by blasting the refuse with high-pressure hoses and piping the slurry to an automated treatment plant - a technique known as hydro mining.
"Low-cost gold mining like the remaining of tailings has a good future in South Africa," said Pan African's environmental officer Reino van den Berg, on a tour of the tailings hills.
South Africa has some 6500 abandoned mines, many with abandoned slag heaps.
Each ton of rock and dirt has about 0.3 grams of gold, making the painstaking search profitable and much less costly and dangerous than a mine several hundred metres underground, Van den Berg said.
However, conflict exists between the three parties who are all fighting for their share in the gold tailings as access to the old mines is often controlled by rival gangs.
And the heaps themselves are an environmental hazard where mine company employees wear anti-pollution masks but thousands live in shanty towns amid the debris.
The air around the hills contains chemical and radioactive particles, and South Africa's gold seams also often contain uranium.