Afghan refugees are Afghanistan nationals who fled their country as a consequence of the long-going Afghan conflict, lasting since 1978. Ever since the Soviet invasion of Afghanistan, refugees have fled into the surrounding states. After the Soviets left, civil war, the emergence of the Taliban, and most recently the Western-led invasion after September 11, 2001 have meant constant warfare in Afghanistan. Millions have fled the violence, then in times of relative peace returned, only to flee again when renewed fighting broke out. About six million Afghan refugees have fled to neighboring Pakistan (mainly Khyber Pakhtunkhwa province) and Iran, making Afghanistan the largest refugee-producing country in the world, a title it has held for 32 years. Afghans are currently the second largest refugee group after Syrian refugees. The mass majority of Afghan refugees (95%) are located in either Iran or Pakistan. Some NATO countries that were part of the NATO forces took in refugees or Afghans that worked with their respective forces. Ethnic minorities, like Afghan Sikhs and Hindus, often fled to India.
In 2013-2014, 2.4 million Afghan refugees were living in Iran, with only 0.8 million of them being registered as migrants who entered legally. Similarly 1.5 million officially registered Afghan refugees were reported to be living in Pakistan in addition to approximately two million more unregistered refugees.
On December 16, 2014, there was a terrorist attack on a school in Peshawar by the Pakistani Taliban group Tehreek-e-Taliban (TTP), the leaders of which are claimed to be based in Afghanistan in areas outside of Kabul control. The attack killed at least 145 people, most of them school children. Following the attack, there have been reports of Afghan refugees in Pakistan encountering serious harassment and often being told to return to Afghanistan. There has been an ongoing exodus of tens of thousands of refugees as of February 2015. According to estimates by the UN World Food Program, by the end of 2016 there will have been about 400,000 undocumented and 200,000 documented Afghan refugees repatriated from Pakistan.
As shown in the table below, the refugees fled Afghanistan in four main waves: