Indeed, while keeping the separation plant open at Bordo Poniente placates the pepenadores, it makes little economic sense. The 20-ton trailers that collect the garbage from neighborhood trucks must now make a detour to the plant before driving to far-off landfills that the city is paying to take its garbage.

Experts say the new landfills are a highly imperfect solution because it is expensive to haul the trash that far and they will fill up relatively soon. In January, neighborhood protests in the towns near the landfills temporarily blocked Mexico City from trucking the garbage there.

“Clandestine dumps could spring up,” warned Gustavo Alanís, the director of the Mexican Center for Environmental Law.

Gabriel Quadri de la Torre, a former federal environmental official who is running for president under the banner of a minor party, said that with proper management, the city could have used Bordo Poniente for many more years, piling new layers on older parts of the dump.

But city officials say they are bringing the problem of Mexico City’s trash under control, finding uses for much of the garbage before sending the remainder to the dump. “The whole issue of the Bordo Poniente is a great opportunity that will allow us to change people’s habits in managing garbage,” Fernando Aboitiz, the city’s secretary of works and services, said recently.

Mr. Aboitiz said that over the past 14 months the city had greatly reduced the amount of trash that needs to go to the new dumps, from 12,600 tons a day to about 4,000.

First, officials cracked down on illegal dumping by other states at Bordo Poniente.

Then the city began enforcing a law to separate organic waste, which now goes to a composting plant at Bordo Poniente that will remain open. The director of Mexico’s National Water Commission has questioned whether the city can process it all.