Garbage heaps have become a never-ending problem in poor and rich neighborhoods.

CAIRO — Trucks haul garbage away, but by nightfall trash bags seem to breed across boulevards and alleys, rising like a foul tide until men and boys, hands quick as birds, scavenge for tin foil flashing in the rising sun.

Trash tumbles and blows, sits in clumps, blocks traffic, smothers canals, tangles in trees and gives this overcrowded city the fly-buzz hum of something not quite right. There is much wrong in Egypt these days, but few things are as irritating and noxious as piles of rotting waste.

"It's affected my breathing. You wouldn't believe how many medicines I'm on," said Sayed Abdelalim, garbage spilling out of a neighborhood dump and coiling down his street. "I have to buy two inhalers a week. We complain to the government, but it's like talking to ourselves."

The trash deluge is part of an array of social and economic setbacks facing this nation since last year's overthrow of Hosni Mubarak. Power outages, crime and fears that subsidies may be cut on bread and propane have unnerved the poor and middle class. Garbage has become another metaphor, a black-humor shorthand, for explaining all that doesn't work.

President Mohamed Morsi launched a "Clean Homeland" campaign when he was inaugurated in June. The program has made some improvements, but trash collection is an underfunded and disorganized network of private contractors, state agencies, street sweepers and Coptic Christian garbage collectors, known as zabaleen, who have been an informal but integral part of the refuse business for generations.

Cairo reportedly generates 14,000 tons of garbage a day — 8,000 picked up by zabaleen and various contractors, leaving 6,000 to litter sidewalks and corners, where sheep headed for slaughter dine on the contents of split-open bags. The problem has been complicated by a cultural mind-set that trash can be tossed anywhere in an ancient metropolis soured by cement dust and factory grit.

It is a shifting landscape, an unspoken war: People in one neighborhood drop trash in another in a cycle that leaves no street safe.

"We are suffering in one of the most polluted cities in the world," said Ahmed Abrass, an environmentalist. "We have typhoid.... When you pollute the air, it affects your mind, your well-being. The Ministry of Environment is very unorganized and unresponsive. Simply collecting the trash won't help. We need a better way of disposal."

Food scraps, machine parts, newspapers, bottles, diapers, couches, dead cats and just about anything else end up before the broom of Sayed Ahmed, who has been sweeping streets for 24 years.

"The trash keeps increasing. It's the only thing in Egypt we don't run out of," said Ahmed, in a blue uniform and askew cap, scooping debris into a white sack. "The population keeps growing and there's nowhere to put it. But people are throwing away bread. You should never throw away food."

Behind him, in the street median, a young man and a boy pick through a small hill of garbage, plucking out recyclables and things that can be sold or tinkered into something new. "We take what we can use," said the man, back bent and oblivious to jockeying donkey carts and microbuses.

This city and its suburbs have a population of about 17 million. Villagers arrive daily from the provinces, and scavenged wood and bricks are used to add new hovels to neighborhoods of slums. It's a grid of perpetual motion and compressed space, where legions of hogs kept by the zabaleen once munched away tons of trash a day. Their ranks were culled in 2009 over misplaced fear that the animals carried swine flu.

"There are no pigs anymore to eat all this trash," said Mahmoud Ahmed, a car parts dealer.

Front-end loaders scrape garbage from streets and trucks drive it away in Sisyphean ritual. As soon as it's cleared, more materializes, even around villas of the rich. Mothers, children at their elbows, struggle to keep hems unsullied while navigating piles and gliding through errands.

"Cairo has long been a city where rich and poor live cheek by jowl, where extreme wealth sits within sight of wrenching poverty. Garbage, however, is one of the few equalizers," according to the news website Ahram Online.

Mohamed Gamal has known days of stink. A waiter in a restaurant on a busy street, he recalled not long ago when garbage piled outside ruined the view for his diners. The government cleaned it up and built a fountain next to the restaurant, a mosque and a playground.

"Egyptians throw away an amazing amount of trash. I don't know where they get it all," said Gamal, a cooking fire burning behind him. "The state is trying. But we need more bins and containers. I expected things to have improved more since the revolution. But we need to change ourselves, our hygiene habits. People should know where to throw their trash. This city is too overcrowded."

Like much in Egypt, the trash predicament will take patience. The fountain outside Gamal's window, after all, still has no water.