Afghanistan and Pakistan have maintained diplomatic relations since 1948. Following the independence of Dominion of Pakistan through the partition of British India in August 1947, the Kingdom of Afghanistan was the sole country to vote against Pakistan's admission into the United Nations, though withdrew from the negative vote days later in October 1947. However, the Afghan government under King Zahir Shah () began providing support to Pashtun nationalist movements within Pakistan and, in 1952, published a tract laying claim to Pashtun-dominated regions of northwestern and southwestern Pakistan. This prevented normalised ties from emerging between the two states. The internationally recognized border between the two states, known as the Durand Line, was rejected by Pashtun-led governments in monarchist and later communist Afghanistan. In 1960, the Afghan military under Prime Minister Daoud Khan launched an unsuccessful invasion in Bajaur, Pakistan, in an effort to take some of the Pashtun-majority areas in Pakistan. It was only after Khan's ouster in 1963 when both countries re-established ties.
Pakistan supported the Afghan mujahideen in the Soviet–Afghan War (1979–1989) and the First Afghan Civil War (1989–1992). In the course of the Second Afghan Civil War (1992–1996), Pakistan aided the Hezb-e Islami Gulbuddin until 1994 when the Inter-Service Intelligence (ISI) played a major role in the creation and funding of the Taliban. Pakistan was one of the only three states to recognize the Taliban-led Islamic Emirate of Afghanistan (1996–2001) against the Northern Alliance-led internationally recognized Islamic State of Afghanistan. Following the overthrow of the Taliban in 2001, Pakistan and the Islamic Republic of Afghanistan maintained relatively cool relations; however, cross-border terrorism led to a number of border skirmishes. Pakistan voiced support for the Taliban takeover of Afghanistan in 2021 under Prime Minister Imran Khan.
Relations between the Taliban-led Islamic Emirate of Afghanistan and Pakistan have been volatile. The Pakistani Taliban (TTP) has been a flashpoint in deterioration of ties. Pakistan has accused the Islamic Emirate government in Afghanistan of having provided a safe haven for TTP terrorists that attack Pakistani territory, while the Islamic Emirate has denied any links between them and the TTP, insisting that it is Pakistan's internal issue. Since 2024, border skirmishes between the two countries have risen to an all-time high, escalating into a direct war in February 2026.
Background
Southern and eastern Afghanistan is predominately Pashto-speaking, like the adjacent Khyber-Pakhtunkhwa, Federally Administered Tribal Areas, and northern Balochistan regions in Pakistan. This entire area is inhabited by the indigenous Pashtuns who belong to different Pashtun tribes. The Pashtuns have lived in this region for thousands of years, since at least the 1st millennium BC.
The Durand Line border was established after the 1893 Durand Line Agreement between Mortimer Durand of colonial British India and Emir Abdur Rahman Khan () of Afghanistan for fixing the limit of their respective spheres of influence. The single-page agreement, which contained seven short articles, was signed by Durand and Khan, agreeing not to exercise political interference beyond the frontier line between Afghanistan and what was then the British Indian Empire.
Shortly after the demarcation of the Durand Line, the British began connecting the region on its side of Durand line to the vast and expansive Indian railway network. Concurrently, the Afridi tribesmen began to rise up in arms against the British, creating a zone of instability between Peshawar and the Durand Line. As a result, travel across the boundary was almost entirely halted, and the Pashtun tribes living under the British rule began to orient themselves eastward in the direction of the Indian railways. By the time of the Indian independence movement, prominent Pashtun nationalists such as Abdul Ghaffar Khan advocated unity with the nearly formed Dominion of India, and not a united Afghanistan – highlighting the extent to which infrastructure and instability began to erode the Pashtun self-identification with Afghanistan. By the time of the Pakistan independence movement, popular opinion among Pashtuns was in support of joining the Dominion of Pakistan. Following the independence of Pakistan in August 1947, the Kingdom of Afghanistan objected to it; however, withdrew its vote by October 1947 and both countries established close diplomatic relations in 1948.
Territorial disputes along the widely known "Durand Line" and conflicting claims prevented the normalization of bilateral ties between the countries throughout the mid-20th century. Afghan territorial claims over Pashtun-majority areas that are in Pakistan were coupled with discontent over the permanency of the Durand Line which has long been considered the international border by every nation other than Afghanistan, and for which Afghanistan demanded a renegotiation, with the aim of having it shifted eastward to the Indus River.
Various Afghan government officials and Pashtun nationalists have made irredentist claims to large swathes of Pakistan's territory in modern-day Khyber Pakhtunkhwa and Pakistani Balochistan, which complete the traditional homeland of "Pashtunistan" for the Pashtun people. Shortly after Pakistani independence, Afghanistan materially supported the failed armed secessionist movement headed by Mirza Ali Khan against Pakistan. Afghanistan's immediate support of secessionist movements within Pakistan prevented normalised ties from emerging between the two states. In 1952 the government of Afghanistan published a tract in which it laid claim not only to Pashtun territory within Pakistan, but also to the Pakistani province of Balochistan. On 30 March 1955, a pro-Pashtunistan group attacked the embassy and the ambassador's residence. They also tore down the Pakistani flag, to protest against the unification of the Pashtun-dominated North-West Frontier Province into West Pakistan as part of the One Unit policy. The protestors were stirred up by the Afghan Prime Minister Mohammed Daoud Khan and bussed to the site. The Afghan police did not intervene, Pakistanis in Peshawar reacted by attacking the Afghan consulate in the city following which the diplomatic relations were severed by Pakistan Diplomatic relations were cut off between 1961 and 1963 after Afghanistan supported more armed separatists in Pakistan, leading to skirmishes between the two states earlier in 1960, and Pakistan's subsequent closure of the port of Karachi to Afghan transit trade.
Mohammed Daoud Khan became President of Afghanistan in 1973. Afghanistan—with Soviet support—again pursued a policy of arming Pashtun separatists within Pakistan. During the 1980s, relations remained tense as the Durand Line was heavily used by Afghan refugees fleeing the Soviet occupation in Afghanistan, including a large number of Mujahideen insurgent groups who crossed back and forth. Pakistan became a major training ground for roughly 250,000 foreign mujahideen fighters who began crossing into Afghanistan on a daily basis to wage war against the communist Afghanistan and the Soviet forces. After the Soviet troops withdrew from Afghanistan, Pakistan-backed mujahideen factions eventually overthrew Najibullah's regime in the early 1990s.
History
From the Afghan civil wars to the war on terror
Although the victorious mujahideen formed a government in 1992 through the Peshawar Accords, Pakistan remained unhappy with new leaders Rabbani and Massoud, including their foreign policy of maintaining friendly relations with India as during the communist era. Pushing for a "trusted" friendly government in Afghanistan, the Pakistani intelligence started funding Hekmatyar-the only mujahideen commander not to sign the Accords-to fight against the new Afghan government in hopes that he would win and install a new government. Through Pakistani funding, Hekmatyar's forces sieged Kabul city with thousands of rockets for three years, killing thousands. However, upon realizing that Hekmatyar was unable to take power in Kabul, Pakistan looked elsewhere.
Pakistan was heavily involved in creating and funding the Taliban in 1994. Pakistan saw the Taliban as a way to secure trade routes to Central Asia and establish a government in Kabul friendly to its interests. The role of the Pakistani military has been described by international observers as well as by the anti-Taliban leader Ahmad Shah Massoud as a "creeping invasion". Pakistani Interior Minister, Naseerullah Babar is said to threw weight behind the Taliban. Around September 1994, the Taliban movement captured the Afghan city of Kandahar and began its long conquest with help from Pakistan. The Taliban claimed that they wanted to clean Afghanistan from the warlords and criminals. According to Pakistan and Afghanistan expert Ahmed Rashid, "between 1994 and 1999, an estimated few Pakistanis volunteers trained and fought in Afghanistan" keeping the Taliban regime in power. The role of the Pakistani military during that time has been described by some international observers as a "creeping invasion" of Afghanistan. UN documents also reveal the role of Arab and Pakistani support troops in the Taliban massacre campaigns.
In late 1996, the Islamic Emirate of Afghanistan emerged and established close relations with neighbouring Pakistan. However, the relations began to decline when the Taliban refused to endorse the Durand Line despite pressure from Islamabad, arguing that there shall be no borders among Muslims.The Unholy Durand Line, Buffering the Buffer by Dr. G. Rauf Roashan. August 11, 2001. A discussion over the Durrand Line between the-then Taliban leader Mohammed Omar and Naseerullah Babar ended abruptly. Omar called Babar, who was an ethnic Pashtun, a traitor for saying that "all problems would be resolved" should the Durrand Line be recognised by the Taliban government.Do the Afghan Taliban and Pakistan get on as well as some think? by Arwin Rahi, Dawn. April 27, 2019.
When the Islamic Emirate of Afghanistan was toppled and the new Islamic Republic of Afghanistan government was formed, President Hamid Karzai stated:Pakistan's Ethnic Fault Line by Selig S. Harrison, The Washington Post. May 11, 2009.
The Karzai administration in Afghanistan has close relations with the Pashtun nationalist Awami National Party (ANP) and the Pakistan Peoples Party (PPP). In 2006, Afghan president Hamid Karzai warned that "Iran and Pakistan and others are not fooling anyone" when it comes to interfering in his country.
The Durand Line border has been used in the last decade as the main supply route for NATO-led forces in Afghanistan as well as by Taliban insurgents and other militant groups who stage attacks inside Afghanistan. The American government decided to rely on drone attacks, which began to negatively affect the US-Pakistan relations.
In 2007, Afghan intelligence captured Muhammad Hanif, the Taliban spokesman. During his interrogation which was recorded, Hanif claimed that the Taliban leader was being kept in Quetta under the protection of the ISI. Pakistan denied the claims.
Relations have become more strained after the Afghan government began openly accusing Pakistan of using its ISI spy network in aiding the Taliban and other militants. Pakistan usually denies these allegations but has said in the past that it does not have full control of the actions of the ISI. There have been a number of reports about the Afghanistan–Pakistan skirmishes, which usually occur when army soldiers are in hot pursuit chasing insurgents who cross the border back and forth. This leads to tensions between the two states, especially after hearing reports of civilian casualties.