Pakistan is worried about the potential destabilization of Afghanistan that could follow the US withdrawal, writes Foreign Policy's Shuja Nawaz. Possible results include "millions of new refugees if fighting breaks out in Afghanistan, and the scary prospect for Pakistan of reverse sanctuary for Pakistani Taliban and other anti-state actors." The latter would be the inverse of the problem that US and NATO forces are dealing with now: Afghan militants can hide on the other side of the Pakistani border, where Western forces cannot pursue them. But Pakistan has its own problem with militants, who could seek refuge in Afghanistan when the US and NATO leave.
The Center for Strategic and International Studies (CSIS), a bipartisan think tank, writes that so far Tehran has been exerting a net positive influence in western Afghanistan by helping to stabilize the region and protect Afghan Shiites (though still supporting occasional attacks on US interests in the country). But when the US leaves, CSIS argues that Iran will look to expand its role in the region, which could worsen the already contentious relationship between US and Iran.
CSIS also notes that Iran has been seeking warmer relations with Pakistan so they can cooperate to prevent Afghan instability. But multiple obstacles, including the Sunni-Shiite divide and divergent security interests, could keep Iranian-Pakistani relations from developing.