Present-day Pakistan has been a haven for refugees from ancient times and many peoples have passed through this land, Afghans have been the single largest group. Afghan refugees had fled to Pakistan in 1978, after a communist government seized power in Kabul. This influx mushroomed after the Soviet Union occupied Afghanistan in December 1979, growing to more than four million in the 1980s. The Soviets pulled out of Afghanistan in 1989, but significant numbers of refugees did not return home until the Afghan insurgents ousted the Soviet-installed Najibullah regime in 1992. Repatriation was very slow because of infighting among the various insurgent factions. In the mid-1990s, the radical Islamist Taliban faction seized control of southern Afghanistan and Kabul. Taliban offensives in northern Afghanistan thereafter, sent hundreds of thousands of new refugees into Pakistan and Iran and displaced large numbers of people within Afghanistan. By the end of the decade, the Taliban controlled 95 percent of Afghanistan, forcing thousands more Afghans to move to Pakistan.
Most Afghan refugees in Pakistan are ethnic Pashtuns. It has become impossible to determine the number of Afghan refugees in Pakistan. Not all Afghans refugees register themselves. Many come and go informally; births and deaths go untracked. During the late 1990s, the UNHCR estimated the Afghan population living in the refugee villages in Pakistan to be 1.2 million for planning purposes but noted that as many as 2 million other Afghans were in Pakistan without documentation. In 2000, the government of Pakistan officially estimated the total Afghan refugee population as 2 million (1.2 million in refugee camps and the remainder in urban centers).
The Pakistani government designates Afghans who entered Pakistan before 1998 to be refugees, although few have document of their status. However, Pakistan views Afghans who entered after 1998 as illegal immigrants, unless they came with a valid travel document or visa, in which case they are permitted to remain in Pakistan legally as visitors, not refugees. The UNHCR considers all Afghans in Pakistan to be refugees, "with the exception of those for whom individual status determination has been carried out and who have either been found to be refugees or have been excluded as per the terms of the 1951 Convention and 1967 Protocol."
A new Afghan refugee influx began in June 2000 and accelerated in October of that year. Pakistan officially closed its border to new Afghan refugees on 9 November 2000, but many Afghans continued to enter by avoiding the main border crossings. UNHCR estimated that more than 172,000 Afghans, mostly members of ethnic minorities, entered Pakistan during the last half of 2000. In early 2001, the government of Northwest Frontier Province (NWFP), with the acquiescence of the national government, embarked on a policy of mass refoulement (forced return of refugees). On 23 January 2001, the governor of NWFP authorized the police to detain and deport any Afghan not holding a valid Afghan passport and Pakistani visa, including both new arrivals and long-term refugees. In June, a UNHCR spokesperson said that many Afghan refugees were "living in a state of fear." Pakistan's deportation of urban Afghan refugees continued throughout the year.
Soon after 11 September 2001, US President George Bush linked the terrorist attacks in New York and Washington to the Afghanistan-based Al Qaeda organization and made clear that the United States would take retaliatory military action. Even before the U.S. military attack began Afghans had begunn fleeing into Pakistan. The pace of new arrivals accelerated, when the U.S. military began bombing in and around Kabul and other Afghan cities. But a mass influx did not materialize, because Pakistan kept its borders sealed, trapping tens of thousands of people within Afghanistan. The Pakistani authorities also blocked the UNHCR and other relief groups from assisting the estimated 160,000 Afghans. The Pakistani instance was motivated by fears that millions of Afghans would enter if Pakistan opened its borders, that the international community would lose interest in the refugees (as it had in the past) and not honor its pledge to meet the costs of assisting them, and that Pakistan would ultimately be saddled with even more refugees.
The 2003 UNHCR report says that more than 2.2 million Afghan refugees, including some 200,000 who arrived during 2001 and about 18,000 refugees of other nationalities are in Pakistan. The UNHCR has recognized only 4,592 Afghans as refugees, mostly persons seeking resettlement in countries outside the region. Pakistan forcibly returned an estimated 3,000 Afghan refugees in 2001 while as many as 65,000 Afghans returned voluntarily from Pakistan. Among the latter group were an estimated 45,000 others who went back after the US-led military action in Afghanistan resulted in the ouster of the ruling Taliban regime.