Thousands of Pakistanis are crossing the border into Afghanistan after Pakistan's army launched an offensive to rid a northern province of Taliban militants. (Reuters)

Two weeks ago, a Pakistani soldier came to Mir Abat Khan’s home in North Waziristan and issued a stark threat: If you don’t leave your home, we will kill you.

The Pakistani military was about to begin an offensive in the region targeting the Taliban, and Khan’s home was in the path of destruction. That’s how he ended up here — in a growing refugee camp in Afghanistan where he is waiting in line for a plastic tent and flour provided by the United Nations.

Afghanistan is battling its own insurgency and is unaccustomed to this daily influx of refugees. The United Nations estimates that there are more than 75,000 in Khost province alone, living in a scrubby open field that is a two-day walk from their home across the border in Pakistan.

Khan brought 12 family members on the trek. They left everything behind: their belongings, their food, two donkeys, three cows, 10 chickens.

“We are here with nothing,” he said, “and we have no idea how long we will stay.”

The Pakistani military operation in North Waziristan, aimed at clearing a longtime Taliban sanctuary, began with airstrikes. Then came what army commanders called a “house-to-house” search for terrorists. The offensive has displaced about a half-million people.

As more of them cross into Afghanistan, officials here have grown concerned about their ability to provide for those refugees in a part of the country plagued by poverty and security problems. When the displaced Pakistanis first arrived, many of them had no shelter from the blistering sun and very little to eat.

“We are just trying to survive,” said Omar Khan Wazir, another refugee.

As the Pakistani military continues its offensive, it is likely that Afghanistan is serving as sanctuary to more than just civilian refugees. For years, Pakistani militants have sought refuge in Afghanistan — much as the Afghan Taliban does in Pakistan.

“They’ve been able to find sanctuary on this side of the border. They are not targeted by our security forces, because they are not our enemy,” one former Afghan official said.

Pakistani officials say Maulana Fazlullah, the head of the Pakistani Taliban, has long found shelter in Afghanistan. Last month, Pakistani Prime Minister Nawaz Sharif urged Afghan President Hamid Karzai to crack down on militants crossing into Afghanistan. On Monday, top Pakistani military officials reiterated that demand, asking Afghan authorities to arrest Fazlullah.

At the refugee camp in Matun district in Khost, there have been no signs of armed men among the displaced. The refugees opted to come here, rather than a Pakistani city, because of an ethnic connection: The people on both sides of the border are Pashtuns, so they speak the same language and share a culture. The border is a construct that many of them refuse to accept.

But for militants in search of a haven, that border is everything. Some officials have suggested that members of the Pakistani Taliban might have found shelter in villages in Khost rather than in the refugee camp.

On Wednesday, when a delegation of Afghan and U.N. officials arrived at the camp to offer support and sympathy, the cross-border tension surfaced.

“The [Pakistanis] give you weapons to come to Afghanistan, but the people you came to fight are now giving you food,” said Mohammad Akram Khpalwak, Afghanistan’s minister of tribal and border affairs.

It’s unclear how long the refugees will remain in Afghanistan. Some suggested that their anger at the Pakistani government might keep them here for many months.

“I don’t want to go back soon,” Khan said. “We’ve suffered so much in these last weeks.”

The effectiveness of the Pakistani offensive also remains in question. The military said in a statement that its troops had discovered “underground tunnels” and “preparation factories” for bombs during the operation.

But many assume that a significant number of militants fled the area in the lead-up to the operation.

“The only ones affected were civilians,” Wazir said.

Refugee crises in the region have historically come about when Afghans poured into Pakistan, as they did during their country’s civil war and during Taliban rule in the 1990s. The current situation marks an unexpected inversion of those migrations.

Although the Office of the U.N. High Commissioner for Refugees is assisting the displaced population in Khost, it is an enormously difficult place to wage a development effort. The province has historically been one of the most dangerous parts of Afghanistan. The local U.N. office closed about a year ago, and U.S. bases in the area have shuttered in recent months.