Pakistan plans to cancel refugee status for all Afghans living in the country at the end of this year, leaving 3 million displaced people – the world's biggest cluster of refugees – facing possible expulsion to a country that many barely know.

Pushing the refugees into Afghanistan would be likely to create a new crisis for the country, already struggling with an insurgency and an economy almost entirely dependent on the western presence and the illicit drug trade.

The west is pressing Pakistan to reconsider its policy, which puts it at odds with the United Nations and other international partners.

The international community and the Afghan government have no strategy prepared to deal with any such influx of people.

However, Pakistan's top administrator in charge of the Afghan refugee issue, Habibullah Khan, secretary of the ministry of states and frontier regions, told the Guardian that Islamabad would not relent. "The international community desires us to review this policy but we are clear on this point. The refugees have become a threat to law and order, security, demography, economy and local culture. Enough is enough," he said.

"If the international community is so concerned, they should open the doors of their countries to these refugees. Afghans will be more than happy to be absorbed by the developed countries, like western Europe, USA, Canada, Australia."

Pakistan has hosted Afghan refugees for more than 30 years, after they fled the Soviet invasion in the 1980s, the horrors of the civil war, Taliban rule and, most recently, the conflict triggered by the US-led invasion of the country in late 2001. Whole generations have grown up in Pakistan and do not know their homeland. It is the largest and longest-running refugee situation in the world.

There are currently 1.7 million Afghan refugees registered in Pakistan – more than half of them under 18 – of whom 630,000 live in camps. A further 1 million are estimated to be living in the country unregistered and therefore illegally.

"After 31 December 2012, there is no plan to extend the validity of the POR [proof of registration] cards of Afghan refugees. Those currently registered will lose the status of refugees. They will be treated under the law of the land. The provincial governments have already been asked to treat the existing unregistered refugees as illegal immigrants," said Khan.

He declined to spell out what would happen to the refugees after the end of the year but, if the policy sticks, they will all be in the country illegally and liable to be thrown out.

The UN is running a voluntary repatriation programme but it is making slow progress. So far this year, it has been able to entice just 41,000 people to return to Afghanistan, a slight increase on the 35,000 who returned in the first half of 2011.

Since 2002, the UN has repatriated 3.7 million Afghans to Afghanistan, but the rate of return stalled in recent years as the war intensified. It is also likely that many of the returnees have slipped back into Pakistan, given that today there are almost as many Afghan refugees in Pakistan as there were in 2002.

Earlier this year, Lady Amos, the former British cabinet minister who is now the UN humanitarian affairs chief, said she was appalled by the conditions for returning refugees after visiting a camp for them in Kabul.

Once they reach Afghanistan, returners are entitled to a one-off $150 (£96) per person from the UN.

Neill Wright, the Pakistan representative of the UN High Commissioner for Refugees (UNHCR), said the UN would still recognise registered Afghans in Pakistan as refugees after the end of 2012 under international law, "until a durable solution can be found".

"We hope that the government of Pakistan will continue to recognise them as refugees," he said. "Returning them to Afghanistan could destabilise the country further at a time when it is already experiencing instability from the drawdown of international forces."

While some Afghans have prospered in Pakistan, the poverty of the majority is obvious, even in Islamabad. On the outskirts of the city, opposite the huge and gleaming Metro supermarket where it is possible to buy everything from imported salmon to a washing machine, lies a little mud-shack settlement of Afghan refugees, all of them officially registered.

No one in the few dozen houses of Sorang Abadi village can read or write, none of their children go to school, there is no electricity or water. Yet none of them want to return to Afghanistan.

"I haven't stepped across the border in 30 years," said Sher Zaman, 62, originally from the northern Afghan province of Kunduz. "I don't even have a single room to go to in Afghanistan. I'm a poor man. I hope I can stay here and die here."