After driving from Pakistan the previous day to a U.N. “encashment” center on the outskirts of Kabul, a family of Afghans wake up at dawn and boil tea after a night sleeping on top of the trucks that carried them. (Andrew Quilty for The Washington Post)

Abdulhalim fled the northern city of Kunduz this month after militants and security forces had been clashing for days.

Now he’s 200 miles away in Kabul, sleeping in a tent and living on aid. He is part of a looming humanitarian crisis aid agencies here are struggling to contain.

Before the current crisis, more than a million people had already been uprooted last year. This year, at least another million Afghans are “on the move” inside Afghanistan and across its borders, in what the United Nations warns is an alarming new wave of displaced people.

Many, like Abdulhalim, fled violence or conflict; others escaped hardships such as poverty or drought. Still others were forced to return from Pakistan and Iran.

Even as the numbers grew, Afghanistan agreed to accept ­Afghan asylum seekers deported from the European Union. The deal, signed in October, could lead the E.U. to construct a separate terminal for deportees at Kabul’s international airport, and as many as 100,000 Afghans could return.

“This sudden increase [in the displaced] has put a lot of pressure on Afghanistan, which has had 30 years of war,” said Nader Farhad, spokesman for the U.N. refugee agency in Kabul. “It’s not easy to put together the infrastructure, to provide the services that are required,” he said, adding that the displaced need everything from food and blankets to jobs and health care.

“To the European countries, we say: Instead of investing in the return of Afghans to Afghanistan, tackle the root causes,” Farhad said. If the United Nations and other aid agencies fail to provide emergency assistance, “it will be a humanitarian crisis,” he said.

Families wait outside for a U.N. “encashment” center to open last month on the outskirts of Kabul. Afghan returnees are provided with health checks, immunizations, and needs assessments. (Andrew Quilty for The Washington Post)

Massive displacement has plagued Afghanistan for years, beginning with the Soviet invasion in 1979.

That conflict kindled two decades of war. When the United States invaded in 2001, some 4 million Afghans were living in Pakistan and Iran.

Many of those refugees later returned, driven by hopes for stability and peace. But now, ­Afghanistan is witnessing some of its worst violence since the United States helped to topple the Taliban.

More than 1,600 civilians were killed in the first six months of 2016, according to a U.N. report released in July. That was the highest number of civilian casualties in the first half of a year since the United Nations began keeping track in 2009.

The violence has been driven by Taliban assaults on Afghan cities, putting more civilians in the crosshairs. And the clashes have pushed even more people from their homes.

“The fighting was intense. There was artillery, rockets, aerial bombardment,” Abdulhalim, 38, said of this month’s days-long battle between Afghan and Taliban forces in Kunduz city. Insurgents briefly seized the city at the same time last year.

“My children were screaming, our neighbors’ houses destroyed,” said Abdulhalim, who like many Afghans goes by one name. “We had no option but to leave.”

Afghan children arrive outside the U.N. center on the outskirts of Kabul. (Andrew Quilty for The Washington Post)

A man prays beside the truck that carried him and his family to the center. (Andrew Quilty for The Washington Post)

In Helmand province, in the restive south, more than 60,000 people have been displaced this year, according to the United Nations, and militants have fought pitched battles in the provincial capital, Lashkar Gah.

At least 5,000 of those displaced in Helmand were forced out only in the past two months, the United Nations says, and thousands more have fled to neighboring provinces and beyond.

“In some provinces, the [armed] groups have more power there, and the government, it is very difficult for us to reach” the affected population, said Sayed Rohullah Hashemi, an adviser to the minister of refugees and repatriation. “We don’t have the capacity to do so, especially in our ministry. The government cannot reach everyone on its own.”

In a dusty lot east of Kabul, the U.N. refugee agency has erected a center for the hundreds of thousands of Afghan refugees arriving from Pakistan. At least 5,000 refugees cross the border from Pakistan every day. The United Nations gives them a small stipend and vaccinates the children against measles and polio.

The influx began after Pakistani authorities announced a deadline for Afghan refugees — of which there were 1.7 million registered with the United Nations — to leave. Many of the refugees had lived in Pakistan for decades, or were even born there after their parents had fled Afghanistan.

Jumauddin, 27, was born in Pakistan to Afghan parents. Now he is heading to Kunduz province, to the Khanabad district, where Taliban fighters hold sway. He says he has no choice.

“Kabul is too expensive, and maybe in Kunduz I can plow a plot of land,” Jumauddin said. “I know that there was fighting there even last week, but I have no other option.”

More Afghan refugees arrive from Pakistan. (Andrew Quilty for The Washington Post)

The government is worried about the return of refugees to areas where insurgents are active. But right now, the Taliban controls more territory than at any time since 2001.

“We are facing the return of tens of thousands of Afghans each month. . . . This will add very much to the vicious cycle of insecurity and joblessness,” said Bashir Bezhen, an Afghan analyst and political commentator.

Reports have already surfaced of returning refugees clashing with locals over resources and land. The displaced are often rejected, or pushed into squalid camps. They also face the threat of forced eviction and rarely have access to clean water or food.

“They are the poorest of the poor. They often live in open air,” the U.N.’s Farhad said. “But they should go back [to their homes] when they feel secure. It has to be voluntary and of their own accord.”

In the area where Abdulhalim took shelter, the displaced worried that the government would force them out. The fighting in Kunduz city had subsided, but they couldn’t just pack up and go home.

“They want us gone from here, but we don’t have anything, not even the money to get back,” Abdulhalim said. He first fled Kunduz on foot, with his children and the clothes on his back.

Bezhen said that the government “is incapable of creating jobs for these people or of improving the economy in the remote places where they live.” He said criminal and terrorist networks will seek out the jobless and displaced youths.

“It will push Afghanistan into deeper crisis,” Bezhen said.

Sayed Salahuddin contributed to this report.

Read more