One of the world's largest open-air landfills, a vast, seaside mountain of trash where thousands of people have made a living sorting through the debris by hand, will close this weekend after 34 years in malodorous service.

Long a symbol of ill-conceived urban planning and environmental negligence, Rio de Janeiro's Jardim Gramacho dump is being transformed into a vast facility that will harness the greenhouse gases generated by the rotting rubbish and turn them into fuel capable of heating homes and powering cars. Environmentalists had blamed Gramacho for the high levels of pollution in Rio's once pristine Guanabara Bay, where tons of run-off from the garbage had leaked.

Less clear is what will happen to the more than 1,700 people who worked at the site, scaling hills of fresh, fly- and vulture-covered trash to pluck recyclable plastic, paper and metal from the 9,000 tons of detritus once dumped there daily. Known as "catadores" in Portuguese, the trash pickers will receive a lump-sum payout from the city, but there's no place for them at Gramacho's replacement, the high-tech Seropedica dump, where most of the Marvelous City's garbage is already being sent.

"When you first get here, you're like, 'Ick, I don't know if I can do this,' but then you get used to it and you make friends and you find it's good work," said Lorival Francisco dos Santos, a 46-year-old from Brazil's impoverished northeast who spent 13 years at the landfill.

In the works for years, Gramacho's closure was postponed several times, and was slated to finally take place just weeks before the United Nations' Rio+20 megaconference on sustainable development here. It also comes as the city gears up to host the 2014 World Cup soccer tournament and the 2016 Olympics.

"We've been telling the catadores about it for years, but somehow they never believed it would really happen," said Gramacho director Lucio Alves Vianna.

Gramacho sprang up on unstable, ecologically sensitive marshland overlooking the bay in 1978 and, for nearly 20 years, functioned with little or no oversight. There was no lining on the massive landfill's floor to prevent leaks of the toxic waste that was routinely dumped there, and the fetid juices produced by the rot of organic materials drained directly into the water, helping make much of the bay unsafe for swimming.

In 1996, Rio authorities stepped in, ending child labor at the site, registering the catadores and restricting the kinds of trash the dump took in to just household waste from Rio and four outlying cities.

Bulldozers started covering the picked-over trash with thick layers of earth. Now, with 12 layers each about 15 feet (5 meters) high, the 321-acre (130-hectare) facility has grown into a literal mountain of garbage overlooking the Guanabara Bay.

Contamination concerns spurred plans to close the dump and tap into the energy created by the decomposition of its estimated 60 million tons of trash. More than 200 wells will capture the carbon dioxide and methane that emanate from the decomposing rubbish and pipe the gases to a facility run by Brazil's state-controlled energy company Petrobras.

Sales of carbon credits and biogas are expected to generate about $232 million over 15 years, a percentage of which will go to payments to the catadores.

Rotting garbage currently accounts for 20 percent of the region's total carbon dioxide emissions and the move from Gramacho to the new state-of-the-art facility is expected to reduce carbonic gas emissions by 1.4 thousand tons per year.

The closure of Gramacho comes months after Mexico City shut down its massive Bordo Poniente landfill, which led to the immediate appearance of thousands of illegal dumping sites throughout the city. Authorities there came under sharp criticism for failing to make sure a viable alternative was in place.

With its Seropedica facility up and running well ahead of Gramacho's closure, Rio appears better prepared. The facility has been kitted out with a triple-layer seal to prevent leakage as well as sensors to detect any abnormality in the soil. Leachate, the liquid produced by the decomposing trash, will be captured, treated and used as recycled water, the new facility's operators said.

Despite the advanced warning, many of the trash pickers say they still have no idea what they'll do next. They expect one-time payouts of about $7,500 a piece in the coming days, but most say they know the money will run out fast.

Though the amount of trash dumped at Gramacho tapered off ahead of the site's closure, with just an estimated 300 trucks arriving daily, as compared with 900 in years past, the catadores say they'll be hard-pressed to find another job that pays as well. Dos Santos, the 46-year-old from the northeastern state of Paraiba, said he used to earn up to $1,500 a month - an enviable sum in a country where the monthly minimum wage is just over $300.

Others say they fear discrimination.

"I've put off looking for a job because I just know that people are going to look down at me like I smell bad or something because I worked here," said 41-year-old Debora da Silva. Though her three daughters know she spent 15 years as a trash picker at Gramacho, she's kept it a secret from many of her friends and neighbors for fear of stigmatization.

The catadores were catapulted to international fame in 2010 when they were featured in an Oscar-nominated documentary about Brazilian-born, New York-based artist Vik Muniz's photo project about the dump. "Waste Land" didn't end up winning the Oscar, but the project raised money for the catadores.

Dos Santos, for one, said the film helped restore the dignity of catadores, who have long helped the region recycle much of its garbage.

"Now everyone knows we do dignified work, that we're recyclers," said dos Santos. "Now, they can't discriminate against us and down there in the city they'll have to receive us with open arms, like the Cristo Redentor," referring to the Art Deco Christ statue that presides over Rio.