Afghan children pose for a picture at a camp for Internally Displaced Persons (IDPs) on the outskirts of Kabul, Afghanistan, 02 December 2014. More than 55,000 Afghans have been interviewed since 2006 for a survey conducted by the Asia Foundation, saying that they fear for their safety. The foundation seeks to improve governance, legal systems, economic development and regional cooperation in Asia. (Hedaytullah Amid/EPA)

Small, pinched faces peered out of mud-walled caves, the entrances covered with thin blankets. From the gloom within came the sounds of children coughing and the scents of farm animals — a blanketed heifer, a huge tethered buffalo — being sheltered against the cold.

This simplest of human settlements, wedged between a public school and a row of gaudy new mansions, is one of 50 such informal camps in the capital, housing 35,000 impoverished former war refugees who returned from Pakistan a decade ago to the margins of an overcrowded city that was ill-prepared to receive them.

“Once the winter comes, the children get sick and we cannot find work,” said Omar Gul, 40, the camp’s leader, who hauls produce and scavenges in garbage pits for pennies a day. “It is a hard life, but it is all we have. At least the police leave us in peace. In Pakistan they harassed us as foreigners, but this is our homeland.”

This month, a horrifying school massacre in northwest Pakistan suddenly raised the threat that a new flood of needy refugees would soon be massing at the Afghan border. The Dec. 16 terror siege on an army-run school in Peshawar, which left 152 students and teachers dead, was carried out by Islamist militants of Afghan Pashtun origin, and Pakistani officials claimed they had launched their attack from across the border.

Almost immediately, officials in the regional province of Khyber Pakhtunkhwa, which has sheltered millions of Afghan refugees from conflict and hardship over the years, demanded that 1.6 million remaining in the region be forced to return home within one month, and Pakistan’s leading government critic echoed their stand.

Afghan children at a temporary shelter in an internally displaced person's camp on the outskirts of Kabul. (JAWAD JALALI/EPA)

Refugee leaders and officials of the U.N. refugee agency protested that this was not only unfair but logistically impossible. On Wednesday, federal Pakistani officials calmed fears of a mass expulsion, saying there was no known link between registered refugees and terrorism, and that they would not be repatriated against their will.

“We are not going to push them forcibly. They will be sent back respectfully on a voluntary basis” over the next year, under a previous agreement with the U.N., federal minister Abdul Qadir Baloch told a news conference in Islamabad. “We will continue to maintain our traditional hospitality.”

Nevertheless, the controversy focused sudden attention on the large number of Afghan war refugees who remain in Pakistan long after the fall of the Taliban, on the daunting challenges facing those who have already returned, and on the political tension the refugee population continues to generate at times of renewed conflict along the volatile Afghanistan-Pakistan border.

According to U.N. officials here, more than 5.8 million refugees have voluntarily returned home from Iran and Pakistan since 2002, but many others have not. In Pakistan, along with 1.6 million registered refugees, at least another half million remain uncounted and have melted into the local ethnic Pashtun population.

Pashtuns are ethnic Afghans who have long inhabited both sides of the porous Afghanistan-Pakistan border. The Pakistani Taliban fighters are drawn from these neglected tribal areas; the Afghan Taliban share their religious agenda but operate separately. In the case of the school massacre, this murky mix has made it easy for Pakistani critics to accuse the large Afghan refugee populace of collusion.

“Nobody really knows how many unregistered refugees there are,” said Nader Farhad, a spokesman for the U.N. refugee agency in Kabul. At the two official border crossings, he said, at least 60,000 people pass back and forth every day, few with passports and many with family networks on both sides.

For Afghan and U.N. officials, who have tried to arrange a gradual, orderly and economically viable return for the remaining refugees over the next year, the thought of them suddenly massing at the Khyber Pass, wheeling carts of possessions with Pakistani guns at their backs, has been especially alarming.

These children share a mud cave with their family goat in an informal camp for displaced refugees in Kabul, surrounded by urban buildings. (Pam Constable/TWP)

Afghanistan is already dealing with a separate refugee influx from Pakistan in the border province of Khost, where about 300,000 Pakistani Pashtuns fled this summer when Pakistan launched a major military operation against the Pakistani Taliban and other Islamist militants in the North Waziristan tribal area. Some are living in U.N. tents and others with relatives.

A far larger problem is the hundreds of thousands of Afghan refugees, known as internally displaced persons, who returned from years of wartime exile but were not able to find homes or steady income.

According to the U.N., there are about 800,000 displaced people around the country, including the 35,000 in the Kabul camps. Some were farmers whose villages or lands were destroyed when they fled abroad years ago. Others have been uprooted by more recent conflict between Taliban insurgents and Afghan and NATO forces.

Many have gravitated to cities, hoping to find shelter, schools and services. What they often found instead was a primitive perch at the low end of urban life, squatting or renting on vacant lots without light or water. The men and boys work as scavengers and porters. The women make dung cakes to use as fuel and haul water in jugs from city wells. Few of the children attend school.

In the winter, these families are heavily dependent on donations of wheat, cooking oil and other kitchen goods, which the World Food Program distributes once a month. Other charitable agencies send in visiting doctors every few weeks, or provide blankets and stoves.

“When a refugee returns, we give them $200 each to start off, but in order to become integrated sustainably, they need jobs, security and economic opportunities,” Farhad said. Afghanistan, though, is still one of the world’s poorest countries, with rampant unemployment and illiteracy. With one in every four Afghans a former refugee, he said, “that is a huge challenge.”

Last week, displaced returnees at four urban camps gathered in dusty lots to wait for their winter kitchen rations. They told similar tales of coming home to ruined villages and hoping for better luck in the city, only to find there was no work and no land, just a new struggle to survive. All, even the children, wore the same hard, weary expression.

“I take my wheelbarrow out every morning and see what I can find,” said Mahmad Salim, 52, a turbaned father of 10 waiting in line for a sack of wheat. He said his young sons help him, gathering glass and plastic to sell and paper to burn as fuel. “If I send them to school, the others laugh and say they are dirty,” he said.

Nearby, two small girls lugged cans of donated cooking oil back to their camp. Inside a one-room mud brick hut lined with old quilts, their mother was rocking a newborn baby and tending a makeshift stove. Their father, who sells used clothing from a cart, said they pay $10 per month for their tiny lot and are constantly pressured to leave.

“There is nothing left for us back home after all these years, but there is little for us here in the city,” said Asif Khan, 34. “My dream is to have a small piece of land to start over. Then I would build a house bigger than the president’s.”