The U.S. and Pakistan are close to signing an agreement regulating the flow of NATO troop supplies in and out of Afghanistan, codifying a somewhat informal arrangement that has fueled the Afghan war over the past decade, AP cited U.S. officials as saying Tuesday. Pakistan pushed for a written pact in drawn-out negotiations that led to the supply line's reopening two weeks ago following a seven-month blockade. Islamabad had imposed the blockade in retaliation for American airstrikes that killed 24 Pakistani soldiers on the Afghan border. That incident brought the already troubled U.S.-Pakistan relationship close to the breaking point. Pakistan is seen as key to getting the Taliban back to reconciliation talks aimed at ending the 11-year Afghan war. The route through Pakistan will be vital to the scheduled withdrawal of U.S. troops from Afghanistan in 2014, one of the reasons the U.S. finally agreed to Islamabad's demand that it apologize for the deaths of the Pakistani soldiers. The U.S. had to compensate for the temporary closure by using a longer route into Afghanistan through Central Asia that cost an additional $100 million per month. The new agreement applies to NATO supplies that have not yet arrived in Pakistan, not the 9,000 plus of containers that have been stuck in the country for months and have slowly started moving across the border into Afghanistan. It also spells out the terms for the tens of thousands of containers that will be needed to pull NATO equipment and supplies out of Afghanistan.