More than 2,000 self-styled "treasure hunters" used to trawl the mountains of rubbish at Gramacho, a dump overlooked by Rio de Janeiro's iconic Christ the Redeemer statue.
Sifting through tonnes of waste, the rubbish-pickers - or catadores - searched for recyclable materials they could sell, and sometimes they literally struck gold.
One day Cleonice Bento glimpsed something particularly shiny among the rotten food and plastic bottles.
"I found a Portuguese gold necklace, sold it and built a two-storey house," she recalls. She even had enough money left over to take a holiday from rubbish-picking for another month.
Geraldo Oliveira, a 63-year-old known as Brizola, uncovered a treasure trove of a different kind.
Nestled inside a tube among the rubbish he found $12,000 (£8,000).
And then $9,000 (£6,000) more.
"I was scared," he remembers. "So I got a $100 note, buried the rest, and went to a money changer to check it was a true note - and it was!
"The dump was a mother, she provided everything."
The move was welcomed by environmentalists, politicians and even the majority of the catadores who, despite the fears about the future, agreed the work was dangerous and inhumane.
Today the gate to the old landfill is locked. The methane gas produced from 35 years of waste now supplies green energy to a nearby oil refinery.
The pickers were not abandoned completely. They received compensation and the promise of a new recycling facility next to the old site.
The Polo de Reciclagem de Gramacho is the first of its kind in Brazil, employing former rubbish-pickers who now work in better conditions with regular hours and pay.
But the former catadores earn only a fraction of what many earned on the dump. Cleonice says she now makes 500 reais (£125, $190) a month, a third of what she used to make.
"Despite the working conditions, the dump was a gold mine," says Dione Manetti, a consultant who has worked with rubbish-pickers across Brazil for 20 years.
Sometimes Gramacho rubbish pickers could make 4,000 reais (£1,000, $1,500) a month, he says.
"At the moment we are happy," says Rosinete dos Santos, an ex-catadora who is now financial co-ordinator of the new recycling facility.
"But if a new dump opened at the end of the road everyone would be out of here and up to the dump in a flash."