Afghans who fled the Soviet invasion and, later, Taliban rule will lose their refugee status in Pakistan at year's end, making them vulnerable to deportation.

A young Afghan refugee makes her way in a slum on the outskirts of Islamabad,… (Muhammed Muheisen, Associated…)

KHAZANA, Pakistan — Awal Gul knows that home is just a two-hour drive over the jagged ridgeline that separates Pakistan from Afghanistan. But he hasn't been there in more than 30 years, since Soviet tanks rolled into Kabul.

A refugee of a long-gone era, he doesn't have a patch of land to return to, or a house or a job. That may not matter.

Pakistan is growing increasingly impatient as host of the world's largest refugee community — millions of Afghans who fled the Soviet invasion and, later, Taliban rule. At the end of the year, Afghans in Pakistan will lose legal status as refugees, making them vulnerable to deportation.

"We've spent three decades here, but every day we feel like strangers," said Gul, 45, a thin, silver-bearded Afghan who lives with his extended family of 24 in Khazana, home to a large cluster of refugees living in two-room, thatch-roofed mud huts. "We can't afford to build real houses here. Even if we could, we wouldn't want to because we know this isn't our homeland, and that one day we'll eventually have to go back to Afghanistan."

To Gul, it feels like falling without ever landing. "We're in an awkward situation, stuck between the sky and earth."

Afghan refugees say they feel caught in the gears of conflicting agendas in their homeland and adopted land.

Afghan leaders insist that a shattered economy and the 10-year war against Taliban insurgents make it impossible to begin accepting returning refugees en masse. Pakistani officials say they don't have plans to immediately begin repatriating Afghans, but they also don't plan to continue hosting an estimated 3.5 million Afghans in a country struggling to meet the basic needs of its own people.

"We know what the situation in Afghanistan is, but that's the failure of the Afghan government and the international forces there," said Engineer Shaukatullah, Pakistan's minister of states and frontier regions, who oversees Afghan refugees in Pakistan. "In 10 years, they haven't been able to provide refugees a secure place to live. That means the whole burden is on Pakistan."

Forcing Afghan refugees to go home could jeopardize fragile ties between Afghanistan and Pakistan, said Neill Wright, the chief representative in Pakistan for the Office of the United Nations High Commissioner for Refugees. That relationship has already been strained by a recent surge in cross-border militant attacks and accusations from Kabul that Pakistan continues to support the Haqqani network, a potent wing of the Afghan Taliban responsible for high-profile attacks in the Afghan capital and eastern Afghanistan.

There are 1.68 million registered Afghan refugees living in Pakistan, according to the U.N. refugee agency. An additional 1.8 million are unregistered and living in the country illegally, Pakistani officials say. Registered refugees are issued special identity cards that allow them to stay in Pakistan. Those cards expire Dec. 31.

Pakistan has yet to announce what action it will take. Officials in Kabul say large-scale deportations by Pakistan could destabilize Afghanistan at a time when the country is particularly vulnerable. Afghan President Hamid Karzai's government is struggling to accept more of the burden of securing the country before Washington's planned withdrawal of troops by the end of 2014.

U.N. refugee agency officials have been trying to persuade the Pakistani government to extend refugee status for Afghans in the country. But Islamabad isn't ruling anything out.

"They are looking at all the options, including forcing refugees back. That would have huge consequences," Wright said.

In addition to damaging ties with Kabul, deporting Afghans also could harm Pakistan's image in the international community and jeopardize crucial economic and humanitarian aid from international donors.

Nevertheless, the presence of Afghan refugees remains deeply unpopular in Pakistan, a sentiment Pakistani leaders are likely to weigh ahead of what are expected to be hotly contested national elections early next year. Many Pakistanis contend Afghan refugees are a source of rising crime and key players in attacks that continue to beset the country.

"They are involved in it," Shaukatullah said when asked about links between Afghan refugees and terrorism in Pakistan. "They have connections with these things."

It's a misguided stereotype, Wright said, but one that persists. "There's no evidence to support it," he said. "And there are endless media articles that say the refugees are bringing polio into the country and are not contributing to the economy. And yet there are so many who are employed, running transportation companies, manufacturing rugs, doing lots of jobs here in Pakistan."