ISLAMABAD — For years, Pakistan has been accused of secretly backing Taliban insurgents in next-door Afghanistan. Now leaders here, reluctant to criticize the new Afghan rulers, find themselves facing pressure from the West to help keep their neighbors in line.

The question of how much influence the Pakistani government retains over a group that once depended heavily on its support has become especially relevant since the Taliban announced an interim cabinet Sept. 7.

To the dismay of many Afghans and foreign governments, the cabinet includes leaders of the Haqqani network, a militant group that American and former Afghan officials have charged was covertly sponsored by Pakistan’s military-led intelligence agency. The Pakistani government denies those charges.

The prominence of the Haqqanis, a group blamed for deadly terrorist attacks as well as scenes of Taliban fighters repressing protesters and journalists, has undermined the new Afghan government’s attempts to put a benign face on its intentions and has prompted Washington and other Western governments to press Pakistan to take a strong stance.

But Pakistani leaders insist that the world needs to be realistic and engage with the new rulers. Otherwise, they say, Afghanistan could face a humanitarian crisis and economic collapse that would directly spill across the border into Pakistan. They have said almost nothing about reported abuses, instead asking for patience as the Taliban adjusts from an armed insurgency to a government.

During an international donor conference Tuesday, Secretary of State Antony Blinken urged Pakistan to “get in line” with the rest of the world and hold the Taliban regime to its promises. But Pakistani Prime Minister Imran Khan, in an interview Wednesday, said the world should “incentivize” rather than pressure Taliban leaders, and that rights for Afghan women, which were severely restricted during Taliban rule in the late 1990s, cannot be “imposed from abroad.”

Khan repeated his appeal Thursday at a meeting in Tajikistan with regional leaders, saying “Afghans should not be left alone” as their new government struggles to organize and tackle widespread social ills after years of war, Information Minister Fawad Chaudhry said in a video statement, quoting the prime minister.

“The critical issue is ensuring that an immediate crisis does not occur,” Moeed Yusuf, Khan’s national security adviser, told foreign journalists Wednesday. To withhold aid while testing the regime’s behavior could lead to economic collapse and a dangerous security vacuum, he said. “We must deal with the government that is there.”

Chaudhry, in a brief interview, put Pakistan’s dilemma more bluntly. “It’s like we’re damned if we do and damned if we don’t,” he said.

Pakistan’s efforts to gloss over Taliban abuses and play down its influence on the group reflect its long-standing fears of being vulnerable to cross-border aggression from Afghan soil. One concern is connected to its rivalry with next-door India. At the news conference, Yusuf claimed India was repressing Muslims in the contested border region of Kashmir and using Afghan territory to potentially infiltrate Pakistan.

Another worry is that homegrown Islamist rebels, who were driven into Afghanistan after waging a terror campaign against the state, could now return to launch new attacks. Taliban officials have promised to thwart such attempts but may not be able to deliver. A suicide bombing in Pakistan’s Baluchistan province on Sept. 5 was claimed by the rebel group.

“We don’t know whether the Taliban have the capacity to take control over terrorist forces inside Afghanistan,” said Rifaat Hussain, a security expert at the National University of Science and Technology here. “Pakistan would be ill-advised to stick its neck out for the Taliban. We need a coherent strategy for dealing with terrorism on both sides of the border.”

There are also domestic constraints on Pakistan's ability to pressure Kabul's leaders. Islamist ideology and religious fervor have been spreading steadily here, and many Pakistanis cheered the Taliban takeover. One was Khan, a British-educated former cricket star who won power in 2019 as head of a secular party. When Taliban forces entered Kabul, he exulted that Afghans had broken the "shackles of slavery" to Western culture.

In an equally extraordinary gesture, Lt. Gen. Faiz Hameed, the army official who heads Pakistan’s secretive Inter-Services Intelligence agency, made a high-profile visit to Kabul on Sept. 4 to call on its new leaders. No details of the meeting were made public, but in photos that appeared in the Pakistani press, Hameed wore a sport coat, smiled warmly and held out his hand to someone.

In some ways, this welcome reflects a historic affinity. Pakistan was one of only three countries to recognize the Taliban regime that ruled Kabul from 1996 to 2001, and for years afterward it was reported to shelter a group of senior Taliban leaders, although both parties denied it. But today, signs of an internal struggle between Taliban factions in Kabul are complicating Pakistan’s relationship with the new rulers.

Last week, reports emerged about a dispute between leaders of the Haqqani group and Abdul Ghani Baradar, the acting deputy prime minister who headed Taliban peace talks with U.S. officials. Baradar was not seen in public for several days afterward. Finally, on Wednesday, he appeared on national TV, telling viewers he was “fine” and that Taliban officials are “closer than a family.”

Baradar, a pragmatist, is viewed as a moderate influence in the emerging government, but Pakistan once kept him in prison for eight years. In contrast, Pakistan’s intelligence agency was widely seen as close to the Haqqani faction. In 2011, Adm. Mike Mullen, then head of the Joint Chiefs of Staff, told a congressional hearing that the Haqqani network was “a veritable extension” of the ISI.

Today, the network’s senior leader, Sirajuddin Haqqani, is Afghanistan’s acting interior minister, and several other members hold powerful posts. But most are under United Nations anti-terror sanctions, and Haqqani has a $10 million U.S. bounty on his head.

“This is a tricky situation for Pakistan,” said Muhammad Amir Rana, a security analyst in Islamabad, noting that the new Afghan government contains “both pro-Pakistan and anti-Pakistan elements.” The relationship may endure, he said, “but this time the Taliban may be the ones holding the strings.”

William Milam, a former U.S. ambassador to Pakistan, wrote in an online column this week that by placing the Haqqanis in key positions, the Taliban “appears to be signaling that it will follow the path of isolation” instead of integrating into the modern international system, even if it means forgoing foreign aid. This choice, he predicted, may lead to violent instability at a terrible “human cost.”

But in the northwest border region of Pakistan, where the Taliban movement was born, its admirers seemed especially energized by the Taliban’s success. A seminary teacher named Maulana Haris called it “a moral victory for all religious people” who have longed to see a “true Islamic system” come to Pakistan.

At a university in Mardan city, where a liberal student named Mashal Khan was brutally killed by conservative religious classmates in 2017, Shakoor Khan, a professor, said the Taliban’s return to power next door was already having a deep impact.

“Our clerics and students are behaving as if they won a battle against mighty powers,” he said. “Friday sermons are all about Taliban success stories. This can change people’s minds, especially the youth.”

Asif, a student who spoke on the condition that only his first name be used out of fear of retribution, said he was worried that the Taliban’s example would further radicalize religious students.

“There are already such pro-Taliban feelings in our society, and now they will rule a country next to us,” he said. “We are afraid the hard-liners will only become stronger now.”

Khan reported from Peshawar, Pakistan.