QADIS, Afghanistan — When the temperatures plunged far below freezing in Niaz Mohammad’s village last month, the father of three struggled to keep his family warm. One particularly cold night, he piled every stick and every shrub he had collected into their small wood stove. He scavenged for trash that might burn, covered the windows with plastic tarps and held his 2-month-old son close to his chest.

But the cold was merciless. Freezing winds whistled through cracks in the wall. Ice crept across the room: It covered the windows, then the walls, then the thick red blanket wrapped around Mr. Mohammad’s wailing son.

Soon the infant fell silent in his arms. His tears turned to ice that clung to his face. By daybreak, he was gone.

“The cold took him,” Mr. Mohammad, 30, told visiting journalists for The New York Times, describing the details of that horrible night.

Afghanistan is gripped by a winter that both Afghan officials and aid group officials are describing as the harshest in over a decade, battering millions of people already reeling from a humanitarian crisis. So far, at least 166 people have died from hypothermia and more than 225,000 head of livestock have perished from the cold alone, according to the Afghan authorities. That does not take into account a vast and rising human toll from malnutrition, disease and untreated injuries as clinics and hospitals around the country have come under stress.

While Afghanistan has endured natural disasters and economic desperation for decades, the harsh temperatures this winter come at a particularly difficult moment. In late December, the Taliban administration barred women from working in most local and international aid organizations — prompting many to suspend operations, severing a lifeline for communities reliant on the aid.

Despite weeks of negotiations between humanitarian officials and the government, the Taliban’s top leadership appears unwilling to reverse the ban. That has left the aid community divided over what a principled response looks like: shutting off aid to millions in need, or trying to continue without women in their ranks, thus greatly reducing their agencies’ reach in Afghanistan.

The Afghan Ministry of Disaster Management has tried to fill the gap, officials say, working with local organizations to provide some food and cash assistance. But the response has been hampered by difficulty reaching far-flung communities (some accessible only by military helicopter), and by financial sanctions from foreign governments.

In recent weeks, some nongovernmental organizations have negotiated with local officials to secure exemptions to the ban, letting them continue to operate with female aid workers in certain provinces. But many donors have balked at the authorities’ discrimination against women, who have effectively been shut out of most aspects of public life, education and employment. Some, particularly among European countries, even privately weighed cutting most funding for Afghanistan in response, according to diplomats and international humanitarian workers.

The temporary cutback in aid has already been felt across Afghanistan, which fell into a humanitarian crisis after Western troops withdrew in August 2021. Soon after, sanctions crippled the banking sector, food prices soared and hospitals filled with malnourished children. Today around half of the country’s 40 million people face potentially life-threatening levels of food insecurity, according to the United Nations. Of those, six million are nearing famine.

In Mr. Mohammad’s village, in the Qadis district of northwestern Afghanistan, the low temperatures devastated people already living on the edge of survival. The district center in Qadis is home to just 4,000 or so families, living in low, mud-brick homes webbed by dirt alleys. The town sits between desert dunes and snow-topped mountains.

In recent years, the province — one of the nation’s poorest — has suffered from a crippling drought that wilted fields and famished farm animals. An earthquake last year razed entire villages. After the Western-backed government collapsed along with the economy, many men in Qadis left for Herat, an economic hub around 100 miles away, or for Iran, looking for work. Few found it.

When the first wave of cold tore through last month, it pushed the town to the brink. Five hundred patients a day went down with pneumonia or other cold-related ailments or injuries, flooding the town’s health clinic in record numbers, according to Dr. Zamanulden Haziq, the clinic’s director.

One resident, Taza Gul, 50, stepped outside at dawn to find her husband stretched out in the snow. He had fallen on his way to their outhouse at night, hours earlier. As she brushed the snow off him, she saw one arm and one leg had turned blackish-blue; he died soon after.

In a village nearby, Gul Qadisi, 62, spent nearly a month desperately trying to secure medical care for her year-old grandson, who developed a relentless cough that left him gasping for air. The roads were too clogged with snow for any cars to take them to a clinic or hospital. Finally she managed to get him to the regional hospital in Herat, where the children’s intensive care unit, run by Doctors Without Borders, was crowded to double its capacity, with two or three sick children for every bed. Doctors told her she had barely made it in time; the child had been near death from pneumonia.

“This winter was the worst winter, the worst I have ever experienced,” she told Times journalists this month, her grandson recovering in a hospital bed at her side.

In this community, as with many across Afghanistan, the overlapping crises of an economic crash, malnutrition and brutal weather have cut short any sense of relief after the long war finally ended in 2021.

“We were happy the fighting is over, but the problem is now we don’t have money to buy food or wood to keep us warm,” said Chaman Gul, a mother of three daughters in her 30s. Her son was killed seven years ago by soldiers with the Western-backed government, who claimed he had provided support to the Taliban, she said. He was 12 years old. Two years later, her husband, the family’s breadwinner, was disabled by a stray bullet.

Ms. Gul and her family live in a one-room home that sits against a hillside a 10-minute walk from the town’s main street. They burn manure, kept piled outside the house, in a makeshift stove for warmth. The house is decorated with scraps the children found during trips into town looking for things to burn: a flier for a cellphone company, drawings from a handbook for mothers that show children collecting water from a river and a well.

When the cold weather set in, village elders tried to organize food for Ms. Gul’s family and others in need. But most of the parents in the town had so little bread and rice that they were already skipping meals so their children could eat. There was nothing left to share.

One recent afternoon, the town was preparing for another cold snap. Men scavenged the nearby hills for as much kindling as they could carry. Elders frantically phoned shepherds who had left with their herds and told them to return — the mountains where they hoped to find usable pastures would soon be blanketed in fresh snow.

Bahaulden Rahimi, a 60-year-old shepherd, was three days into a six-day journey to find land where his sheep could graze when he got the warning call. Haunted by the account of a shepherd who had died with his herd when temperatures dropped in January, he came straight home.

Now, he worries that he has merely delayed his flock’s fate. He was running out of feed, the price of which had more than doubled at the local market in recent months, he said. He had picked up a hacking cough that was worsening by the day, and 13 of his 80 sheep had already died from the cold, a roughly $3,000 loss that threatened his family’s lives, as well.

“Losing the sheep, it’s like losing a family member,” he said. “This is all we have.”

Safiullah Padshah contributed reporting from Kabul, Afghanistan.