KABUL —On an early winter morning, the city is still dark when the boys gather at their regular spot, a garbage dump where a bony dog is already nosing for food. Each one carries an empty jute sack that will be bulging by nightfall. It is bitter cold, but they are dressed in thin, grimy jackets and pants. Most wear no gloves. Some wear no socks.

When the last straggler arrives, the band of a dozen scavengers sets off, looking for treasures in the trash.

The boys walk fast, poking into bins and barrels and drain ditches, stuffing soda cans and plastic bottles into their sacks. They fan out among icy alleys, whistling and shouting to keep in touch.

Mansour, 15, is the oldest and sharpest. He keeps an eye out for the others, and carries an old cellphone to call home in emergencies. Every day, he wears the same smudged pink sweatshirt with a perky kitten logo. But he is unsmiling and stern.

“Our parents are not happy to send us out here, but there are no jobs and no money,” Mansour said one recent morning. “They say it is honorable work, not like begging or stealing. Even if we only bring home 10 afghanis [7 cents] from what we sell, it is better than doing wrong work.”

Afghanistan’s capital of 6 million is full of new apartments and shopping malls, but it is also densely overcrowded and full of desperately poor people. There are few steady jobs for adults without skills, and even day-

labor work is scarce. No social welfare system exists for the poor, and only meager subsidies are available for disabled war victims and widows.

Virtually all charity comes from international agencies, and most of that goes to returned refugees from Pakistan and Iran, or to rural families displaced by fighting or drought. This winter, the World Food Program has provided food and cash to about 70,000 needy people in Kabul, many of them displaced families in tent settlements who have registered to receive aid.

“We do what we can, but we are only putting our finger in the dike,” said Zlatan Milisic, the program’s director here. “We provide humanitarian aid to the displaced, and seasonal support to identified urban poor, but a lot of people who may need help don’t fit into any category.”

In 2018, WFP assisted more than 5 million Afghans, but with 13 million lacking sufficient food, Milisic said, “where can you even start?”

Those on the margins of city life survive any way they can. Some are beggars, old men with crutches and women in burqas who huddle outside mosques and markets. Some are boys with wizened faces who wash car windows, peddle toys, or blow smoke from tiny pots at strangers in a ritual blessing and hope for spare change in return.

The scavengers are a different breed.

Tightknit bands of brothers, cousins and neighbors, mostly between ages 8 and 14, they roam the back streets like small armies, each group with its own informal turf, finding value in items others have discarded — and a certain amount of pride in an occupation from which others would recoil.

They avoid traffic cops and keep stones handy to ward off menacing dogs. A few shopkeepers and security guards regularly save items for them. The boys often joke and roughhouse as they trudge along, but there are constant reminders of war and danger: A convoy of troops rumbles past; a strange metal object in a garbage bin looks like an unexploded mine.

Two summers ago, Mansour was scavenging downtown when a massive truck bomb exploded nearby, killing 80 people and wounding more than 400. His mother heard the blast and was worried. “I didn’t have a phone then, and she came all the way downtown, looking for me,” he recounted.

War has followed these boys since they were born. Some were raised in Pakistan, where their families had fled from civil war and Taliban repression. Some were driven from rural Afghan villages by conflict, and their families landed in Kabul with no work, relatives or sources of help.

Mostly, they rely on each other, sharing tiny houses off dirt alleys. Few of their fathers have formal jobs, though some go out with satchels of tools and wait for pickup construction work that brings home $4 a day. But in cold weather, even a chance to load bricks is rare. Often the only day’s income is from what the boys sell by the pound at junkyards.

Mansour’s family migrated from Laghman province four years ago after their village was overrun by the Taliban. Now they rent a decrepit house with two other families for $100 a month. Mansour, who goes to public school except during the three-month winter break, said that he wants to become a doctor someday but that his family comes first.

“It is hard to send a child into the streets, but Mansour is a rock for us,” said his father, Wahidullah, 40, who has no job and has never been to school. “Our life has passed in hard times, and we want our children to have a normal life, if peace ever comes. For now, we tell him, ‘Don’t steal, don’t fight, just find something out there and come home early.’ ”

Once a week, Mansour and several other boys stop at a junkyard, where they dump out their sacks and the owner weighs the contents. Depending on the material, they get between 20 and 50 cents per pound. Mansour watches the scale carefully. “Sometimes they try to cheat us,” he says.

For 12-year-old Samiullah, life is even more precarious. His family of 13 lives in a walled dirt yard that was empty when they arrived a year ago, fleeing from fighting in Takhar province. His father, Niaz Mohammed, has built a two-room hut and a shed for keeping goats, whose owners pay him a small monthly fee. The landlord lets them live there free. A neighbor shares well water and lets them hook up a single lightbulb at night.

Almost everything Samiullah’s family possesses has been scavenged. His dad collected bricks and wood in a wheelbarrow to build their hut. The yard contains piles of plastic bottles and scrap metal. The goats eat limp carrots and cabbage his father has scrounged outside restaurants, and one of them has been draped in an old military jacket for warmth.

“I found this today. We’ll cook it for dinner,” said Mohammed, 47, pointing to a dish of eggplants. His face has a permanent look of defeat. He keeps an old document from the U.N. refugee agency, which gave him $1,000 when his family returned from Pakistan five years ago. The money is long gone, and Mohammed said he had been to several offices seeking help but could not remember their names.

Samiullah also has the furrowed brow of someone with heavy responsibilities. He worries about his 7-year-old brother Ezmat, who has been coughing lately when they go out scavenging. But one recent morning, when the boys came upon a smooth frozen patio in a park, their cares vanished. Abandoning their sacks, they began sliding and tumbling on the ice, shrieking with childish glee.