U.S. Defense Secretary Leon Panetta arrived in Kabul on a previously unannounced visit Wednesday to discuss the U.S. presence in Afghanistan after international combat troops complete their withdrawal in 2014. American, Afghan and Pakistani officials have recently ramped up talks on regional security and agreed to cooperate on defense priorities. Fear of the consequences of failure in Afghanistan appears to be pushing the sides closer together.
Faced with the potential of increased violence in Afghanistan after international combat troops leave in 2014, Pakistan and the United States appear to be working more closely to ensure stability in the region.
Pakistani Senator Mushahid Hussain said a recent flurry of high level talks between Washington and Islamabad means relations between the two regarding Afghanistan are back on track.
"Pakistan is fully in the loop, the United States is now trying to ensure that Pakistan should be part of the process of reconciliation," said Hussain.
Pakistan's military, which in the past bet on militant groups to maintain influence in Afghanistan, now also appears to be focusing on its relationship with the United States to strengthen its position vis-a-vis its neighbor.
Simbal Khan of the Woodrow Wilson Center in Washington said there is a clear understanding in Islamabad that if the security situation worsens in Afghanistan, the impact on Pakistan will be significant.
"For Pakistanis I think it is a better deal to kind of engage with the U.S., and push forward the agenda," said Khan. "There is no perfect fit, there are divergences, strong divergences on Afghanistan still, but I think there is a middle space in between where the both sides have moved and where they can both cooperate moving forward."
The post-2014 U.S. plan for Afghanistan envisions a substantial presence of U.S. personnel there to help Afghanistan's struggling security forces. Analysts believe that presence will include a strong counter-terrorism element led by U.S. special operations forces and the CIA.
Many Taliban on the U.S. target list are hiding along the border with Pakistan. Khan said Pakistan fears that failure to bring the Taliban into a peace process prior to the drawdown of international troops could mean increased Taliban attacks. That, in turn, could trigger U.S. retaliation against Taliban sanctuaries inside Pakistan.
"That could lead us again to a point where relations between U.S. and Pakistan become worse and Pakistan actually becomes a target for counter-terror strikes rather than a partner," said Khan. "This is very important, Pakistan - I think what we are worrying about is that we become less of a partner as far as counter-terrorism is concerned and more of a target in a post-14 scenario."
According to a December 2012 Pentagon report, the insurgency in Afghanistan continues to benefit from sanctuaries in Pakistan.
But U.S. Defense Secretary Leon Panetta, in the past harshly critical of Islamabad's failure to pursue militants on its soil, said this week the U.S. was encouraged by Pakistan's willingness limit the terrorist threat within the country.
Analyst Imtiaz Gul said both the international community and Islamabad have realized they cannot move forward on Afghanistan without each other.
"There is no way around Pakistan and Pakistan also has realized it's time to offer the so-called olive branch to U.S. as well as the Afghans because this is the time to hit - the iron is hot and perhaps they can extract some medium to long-term strategic gain out of their partnership, their willingness to work towards reconciliation," Gul said
To that end, Pakistan has responded to Afghan requests and released several Taliban militants, and held top-level meetings with the Afghan Foreign Ministry. Lawmakers from both countries are also in bilateral talks.
But analysts caution that the relationship between all three countries remains fragile and at any time the cost-benefit calculation could change.