Image copyright Getty Images

The closure of Latin America's biggest rubbish dump in 2012 was widely applauded. But little more than two years on, many of the rubbish-pickers who worked there are sorry it's gone, and poorer without it.

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.

The dump was a mother, she provided everything

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."

Image copyright Getty Images

Cleonice and Geraldo were just two of the thousands of catadores who lost their jobs overnight in 2012, when Gramacho dump was closed down in the weeks before a UN environmental summit in Rio.

Listen to Your Rubbish, Our Hope on the BBC World Service here. The world is getting wealthier - but with rising inequality, the BBC is investigating the winners and losers of this richer world in 2015. A Richer World 2015 More Richer World programmes

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.

"We now have a canteen, a bathroom and a kitchen. We have more comfort and safety," says 62-year-old Cleonice.

If a new dump opened everyone would be out of here and up to [it] in a flash Rosinete dos Santos

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."

No-one pretends the dump was paradise - it's common for the rubbish-pickers to have mixed, sometimes contradictory feelings.

Image copyright Getty Images Image caption The trucks unloading tonnes of rubbish everyday were a dangerous hazard to the catadores

Serious accidents, illnesses and even deaths were common. And outside the dump the catadores faced stigma and discrimination within Brazilian society.

"It wasn't difficult to deal with the rubbish. It was difficult not to become rubbish," says Gloria Cristina dos Santos, who is now the recycling facility's coordinator.

"I never told anyone at school I came from the dump. I couldn't make friends because I was so ashamed and for a long time I could not look at myself at the mirror."

Gloria began working there when she was 11. "Back then all the hospital waste was mixed in with the domestic rubbish, so there was a lot of blood, foetuses, dead bodies, animals," she recalls. "It was very dangerous."

Once she stepped on a needle and couldn't work for six months. Then at 15 she was buried under a mountain of rubbish, only surviving after her friends dug her out.

"I got [The Prince by] Machiavelli out of the slime, took it home, dried it behind the fridge and ironed it Tiao dos Santos

A year later Gloria became pregnant. After struggling with post-natal depression, she tried to commit suicide.

But the same dump that was causing her such sorrow and despair brought her salvation - in the form of Russian novelist Fyodor Dostoyevsky.

Over the years Gloria had carefully curated a small library of books salvaged from the dump. And she credits a passage in Dostoyevsky's The Brothers Karamazov for teaching her how to love her daughter.

"I didn't have any treatment - it was the books that helped me. They saved me," she says. "That was my way of living other lives, of travelling. I was a compulsive reader, I would read four or five books a week, and in the midst of that hard life I was high on books!"

Gloria's brother Tiao dos Santos, who had worked on the dump since he was eight years old, also found inspiration in literary waste - from Renaissance Italy in his case.

"I got [The Prince by] Machiavelli out of the slime, took it home, dried it behind the fridge and ironed it," he recalls.

"And I learned all the skills of The Prince - I didn't read Machiavelli as a Renaissance writer, I read him as a modern one. The game of interests, politics and malevolence was one I knew how to play."

Image copyright Tiao dos Santos Image caption Tiao, in the centre, worked on the Gramacho dump from the age of eight

Tiao eventually became a leader of the catadores, founding the first rubbish pickers' association in Brazil 10 years ago and later starring in the Oscar-nominated documentary film Waste Land.

Machiavelli did the rounds. Tiao shared his copy of The Prince with his two closest friends, hoping they too would be inspired and help him fight for better working conditions for the catadores.

"We were a reading group," says Jose Carlos Lopes, known as Zumbi, a rubbish-picker for almost 30 years from the age of nine. "Machiavelli inspired me by his leadership and comradeship across the centuries. He taught me how to be a leader, how to lead from the front."

Image caption Tiao's Machiavelli-inspired friends Zumbi and Gordinho helped him fight for the rights of catadores

And it was the catadores' activism that secured the government's guarantee to provide a new recycling facility for ex-catadores to work in.

The plant that stands there is the fulfilment of a dream - but only in part.

For a start there's not enough material to be recycled.

Whereas before the rubbish-pickers could sift through the dump and filter out sellable goods, the new recycling plant relies on companies willing to donate cardboard, paper, aluminium, glass or plastic.

Meanwhile 10,000 tonnes of mixed domestic rubbish are sent to a new dump every day. But there the rubbish is sealed with soil and covered in grass - no catadores are allowed in.

Image copyright Getty Images

The lack of waste to recycle has caused expansion plans to be put on hold.

Original blueprints for 12 warehouses employing 500 rubbish pickers are still a long way from being realised.

Currently there are just two warehouses and only 50 people are employed.

That's 50 out of the 2,000 who once worked on the dump. The rest have had to find other ways of supporting themselves.

"It's frustrating but it doesn't minimise the size of our achievement," Gloria says. "We managed to make the government see us and be accountable."

I really miss it. It was not only because of the money but because of friendship

She too experiences nostalgia for the old days, though.

"We suffered a lot but we were a family," says Gloria. "We felt we belonged to the dump and we helped each other.

"No-one will tell you that he misses working there but everyone says they miss the companionship we had, because ultimately we felt it was us, catadores, against the rest of the world."

Recreating that same atmosphere as before is part of her vision for the new recycling plant.

"We want to recover that essence. I really believe we will do it. It is my aim in life, my dream," she says.

Image copyright AP Image caption Brizola (left), comforted by Tiao, was among many who found the dump's closure a traumatic experience

Brizola was the last catador to leave the dump.

"I stayed up to the very end. I had to see the ending. And I really miss it. It was not only because of the money but because of friendship."

In a small drawer next to his television, he safely keeps a small plastic bag with something precious inside.

"There it is in my hand. Earth from the dump. It carries love… and when I die it will be buried with me."

Listen to Your Rubbish, Our Hope on Wednesday 21 January at 16:32 GMT and 20:32 GMT on the BBC World Service here

This article is part of the BBC's A Richer World, a season exploring the world's wealth, poverty and inequality

Subscribe to the BBC News Magazine's email newsletter to get articles sent to your inbox.