For the last two decades, conventional wisdom in Pakistan held that an Afghanistan ruled by the Taliban would be a boon to Pakistan’s security. Islamabad has long supported the Taliban with the understanding that the militants could help deny India­—which many Pakistani officials see as an existential threat—any influence in Afghanistan. But since sweeping back to power last August, the Taliban have confirmed how misguided the conventional wisdom truly was. Pakistan has become less safe, not safer, after the Taliban’s victorious march into Kabul.

The success of the Taliban in Afghanistan has galvanized the Tehrik-e-Taliban Pakistan, a militant group also known as the Pakistani Taliban or the TTP. This group has launched more than 124 terrorist attacks since the Taliban returned to power in Pakistan (including suicide attacks) from bases in Afghanistan. The TTP’s activity has led to tensions between Islamabad and the Taliban in Kabul. Retaliatory air strikes by the Pakistan Air Force have provoked protests from the Taliban authorities. Taliban border security guards have challenged Pakistani efforts to fence the Pakistan-Afghanistan border. A senior Pakistani general, who until recently headed Pakistan’s Inter-Services Intelligence (ISI), had to visit Kabul for talks with the TTP, facilitated by the Afghan Taliban.

Not for the first time, Pakistan’s support for the Taliban has come back to bite it. Islamabad’s assiduous efforts to secure international recognition and economic assistance for the Taliban regime have had little success. The international community has made it clear that it would not rush to recognize the Taliban unless they change their behavior. The Taliban, on the other hand, have refused to relinquish their hard-line stance on issues such as women’s rights and allowing girls into school, making Pakistan’s insistence that the Taliban had evolved seem misguided. Under Taliban rule, Afghanistan is a pariah state. A new Pakistani government now faces the prospect of having to prop up a troublesome ally in Kabul and a cash-starved populace next door at a time when its own economy is struggling. Years of Pakistani backing have helped the Taliban return to power but have not, in any appreciable way, helped Pakistan.

THE TIES THAT BIND

Pakistan’s support for the Taliban has always been rooted in ideology rather than in realpolitik. Since its creation in 1947, Pakistan has based its security policies on the notion that India, its neighbor to the east and frequent foe, seeks its dissolution. Pakistani leaders have imagined that India wants to undo the partition that cleft the subcontinent in two and created Pakistan from the Muslim-majority provinces of British India. They have also long been wary of Afghanistan to the northwest. Kabul has traditionally refused to accept the border between Afghanistan and Pakistan, a colonial-era artifact from 1896. As far back as the 1940s, Afghan leaders demanded the creation of “Pashtunistan,” uniting Pashtun territories on both sides of the border. Both Hamid Karzai and Ashraf Ghani, the Afghan presidents who ruled the country between the fall of the Taliban in 2001 and their return 20 years later, spoke of maintaining good relations with Pakistan but did not change Kabul’s position on Pashtun unity.

Suspicious of both its neighbors, Pakistan feared an alliance between India and Afghanistan. Such an alliance would leave it trapped between two rivals. Pakistan assumed a major role in Afghanistan in the 1980s, when it supported the United States’ proxy war against the Soviet Union, not out of fealty to Washington but to pursue its own strategic ambitions; Pakistan had hoped to extend its influence into Afghanistan long before Soviet troops invaded the country in 1979. Islamabad deemed Islamist groups the most effective instrument for spreading its influence, a policy that culminated in the rise of the Taliban in the 1990s.

The U.S. invasion of Afghanistan in 2001 reinforced secular and Pashtun nationalist elements of Afghan society, whom Pakistani leaders saw as being close to India or, worse, outright proxies for India. Pakistan’s own Pashtun nationalists called for the unity of Pashtuns, exacerbating Pakistani fears about Afghan irredentism. Pakistan sought to suppress Pashtun nationalism with pan-Islamist ideology. Pakistani Islamists supported the Taliban, many of whom were educated in Pakistani seminaries (madrassas), because of their shared belief system. But Pakistan’s military saw the Taliban insurgency as insurance against an India-Afghan entente under secular Afghan leaders. Notwithstanding Islamabad’s formal denials, Pakistan provided a safe haven for Afghan Taliban insurgents and allowed the Taliban leadership to operate out of Pakistan for the last two decades.

NOT QUIET ON THE WESTERN FRONT

Throughout its military involvement in Afghanistan, Washington ignored or dismissed suggestions by Afghan leaders and Pakistani dissidents that Pakistan’s support for the Taliban might have a deeper ideological foundation than Islamabad conceded. Understanding Pakistan’s motivations might have led the Americans to depend less on Pakistan in the war effort in Afghanistan. The United States could also have saved billions of dollars in assistance it gave to Pakistan in return for the country’s failure to assist or, more charitably, inadequate cooperation in stabilizing Afghanistan. U.S. diplomats found the notion of an Indian threat to Pakistan through Afghanistan outlandish and assumed they could persuade Pakistan to change its strategic calculus. Pakistan, on the other hand, described to Western diplomats and generals its relationship with the Taliban as a hedging strategy to deal with the consequences of an inevitable U.S. withdrawal.

Pakistan did not expect a U.S. military withdrawal from Afghanistan to mark the end of Washington’s interest in the region. It hoped to emerge as a key lynchpin in the region as both the preeminent foreign power in Afghanistan and the main intermediary between the Taliban and the United States and its allies.

During the Biden administration’s poorly executed withdrawal from Afghanistan last summer, Pakistani officials remained optimistic about maintaining influence over the Taliban while retaining close ties with the United States. This was a huge miscalculation. Influence moves both ways. Pakistan’s powerful intelligence agency, the Inter-Services Intelligence, holds sway over the Taliban through material support and personal ties with the leadership. But the Taliban have gained powerful constituencies within Pakistan, such as conservative clerics and Islamist political parties. The Taliban and the Haqqani network, a strong faction within the militant group, may have accepted Pakistani support for years but do not wish to be Pakistani proxies forever. As a powerful state, Pakistan continues to have the upper hand in the relationship, but the balance of power is less lopsided now that the Taliban rule all of Afghanistan.

Ideologues within the Afghan Taliban are unwilling to break ties with the TTP, who are responsible for some of the worst terrorist attacks inside Pakistan since 2007. The TTP attacked the headquarters of the Pakistan military in 2009 and claimed responsibility for an attack on an army school in Peshawar that killed 145 people, mainly schoolchildren, in 2014. Pakistan’s military has fought the TTP in the areas bordering Afghanistan and has complained in the past that Pakistani Taliban commanders have found shelter inside Afghanistan.

After the Taliban’s victory in Afghanistan, Pakistan expected the Afghan Taliban to broker a cease-fire between their Pakistani counterparts and the Pakistani government. But those talks failed, and Pakistan has conducted several drone raids and air strikes against TTP targets in Afghanistan. Pakistan’s media have suggested that these strikes have the tacit support of Kabul’s Taliban rulers, even though Taliban officials have ritually protested Pakistani violations of Afghan sovereignty just as Pakistan used to protest U.S. cross-border drone strikes (even those that originated from facilities within Pakistan).

Whatever the case, this violence has dashed Pakistani hopes that a Taliban government would lead to a secure western border. In Pakistan’s southwestern Balochistan Province, which borders Afghanistan, secular Baloch nationalist insurgents have also gained ground instead of being uprooted by the Taliban. For years, Pakistan blamed the republican government of Afghanistan (and its Indian backers) for helping the Baloch separatists, including by letting them find shelter in Afghanistan. But since the fall of that government and the evaporation of Indian influence in Afghanistan, the Baloch groups seem to have only gained in strength, launching some of their most deadly attacks and even targeting the infrastructure projects of Pakistan’s close ally, China.

TURNING A NEW LEAF?

A new civilian government in Pakistan came into power in April after the ouster of Imran Khan, the prime minister who ruled largely with the consent of the generals for the past four years. Khan lost a vote of no-confidence in the National Assembly after losing his majority in the legislature—and after the army, much to his chagrin, did not intervene to keep him in power. He has been replaced by Shehbaz Sharif, who heads an uneasy coalition of rival parties that banded together to unseat Khan. Although Sharif’s government is expected to improve ties with the United States by jettisoning Khan’s incendiary anti-Western rhetoric, the government is unlikely to change Pakistan’s policy toward Afghanistan, which remains the purview of the military and the ISI.

Pakistan’s military leadership has shown little inclination to shed its India-centered worldview, which in turn binds it to maintaining its close ties with the Taliban in Afghanistan. A change of course is needed, but unlikely. Pakistan could pressure the Taliban militarily and economically, demanding that they share power with other Afghan factions and reverse some of their most extreme policies. But Pakistan’s generals are unlikely to embrace that option and risk losing a partner in their imagined strategic tussle with India.

The Taliban’s victory in Kabul may have a lingering impact on Pakistan’s domestic politics and on the prospect of renewed relations with the United States. Khan has refused to accept his removal from office. He is hoping to tap sympathy for the Taliban to create a wave of anti-American sentiment that he can ride back into office. In the weeks following his ouster, Khan led massive rallies across the country, repeating unsubstantiated allegations that the United States conspired to push him aside. Khan’s rhetoric risks further polarizing Pakistani society and politics as the country grapples with a severe economic crisis, with stagnant growth, mounting inflation, and huge external debts.

It also risks hampering Islamabad’s efforts to patch up relations with Washington. In the past year, the Biden administration has not just extricated itself from Afghanistan; it has also distanced itself from Pakistan. After entering the Oval Office, Biden never called Khan, a snub that rankled the former prime minister. With a new government now in place in Islamabad, the moment is right for recalibration of ties. Pakistan’s dire economic situation necessitates looking to the United States for support. Washington should offer that support in return for Pakistan’s leaders agreeing to serious political and economic reform, including a revision of Pakistan’s view of Afghanistan as a Pakistani satellite and India as an existential foe. Shutting down Pakistan’s jihadi infrastructure—the welter of militant groups and centers for training and indoctrination—is a precondition for Pakistan turning a new leaf and must be a prerequisite for a new U.S.-Pakistan relationship.

A TOXIC BREW

Pakistan must revise its approach to the Taliban. Successive Pakistani leaders who supported the Taliban in the hope of making Pakistan more secure clearly misunderstood the real challenges facing their country. Their avowed fears about Pakistan’s security—even after the country developed nuclear weapons in the 1990s—can be better explained by psychology or the imperatives of politics than any reasonable assessment of reality. For decades, Pakistan’s Afghanistan policy has stoked pan-Islamism, jihadism, and paranoia about India. That toxic brew has prevented Pakistani leaders from treating India and Afghanistan as trading partners, instead transforming Pakistan’s neighbors respectively into a permanent enemy and a strategic threat. Helping the Taliban win has only added to Pakistan’s problems, not solved any of them.