Pakistan agreed to reopen key supply routes into Afghanistan, ending a bitter stand-off after US Secretary of State Hillary Clinton said she was sorry for the loss of life in a botched air raid.

A US official said that as part of the deal Washington will release about $1.1 billion to the Pakistani military from a US “coalition support fund” designed to reimburse Pakistan for the cost of counter-insurgency operations.

The money had been frozen due to the tensions between the two countries.

The agreement ends a seven-month diplomatic row that had seen US-Pakistan ties, already soured by the US killing of Al-Qaeda chief Osama bin Laden, plunge to a new low and gravely impede US and NATO efforts in Afghanistan.

The breakthrough, announced by Clinton after she spoke by telephone with Pakistani Foreign Minister Hina Rabbani Khar, follows months of negotiations.

Islamabad, a key but wary ally in the fight against Taliban militants, had steadfastly insisted Washington should apologize for the November attack when a US aircraft mistakenly killed 24 Pakistan soldiers.

“Foreign Minister Khar and I acknowledged the mistakes that resulted in the loss of Pakistani military lives,” Clinton said in a statement.

“We are sorry for the losses suffered by the Pakistani military. We are committed to working closely with Pakistan and Afghanistan to prevent this from ever happening again.”

Pakistan confirmed it had decided to reopen the routes into Afghanistan, which are vital as the US and its NATO allies withdraw troops and equipment from Afghanistan ahead of a 2014 deadline.

“The meeting of Pakistan’s defense committee (DCC) of the cabinet has decided to reopen the NATO supplies,” the minister of information, Qamar Zaman Kaira, told reporters in Islamabad.

Pakistan’s new Prime Minister Raja Pervez Ashraf, who chaired the meeting, also acknowledged it was time to end the blockade.

“The continued closure of supply lines not only impinge our relationship with the US, but also on our relations with the 49 other member states of NATO,” he told top civilian and military leaders.

But underlining ever-present security fears, the deal drew a swift warning from the Pakistani Taliban that they would attack NATO supply trucks and kill the drivers if they tried to resume ferrying in supplies to Afghanistan.

Spokesman Ehsanullah Ehsan told AFP the Taliban “will not allow any truck to pass and will attack it.”

The blockade had forced the United States and its allies to rely on longer, more expensive northern routes through Central Asia, Russia and the Caucasus, costing the US military about $100 million a month, the Pentagon has said.

Initial hopes of a deal on reopening the routes had fallen apart at a NATO summit in Chicago in May, amid reports that Pakistan was demanding huge fees for the thousands of trucks that rumble across the border every year.

Clinton stressed that “Pakistan will continue not to charge any transit fee,” adding it was “a tangible demonstration of Pakistan’s support for a secure, peaceful and prosperous Afghanistan.”

The deal was announced just days before Tokyo hosts a donor’s meeting on Afghanistan this weekend, when Afghan President Hamid Karzai will reportedly seek $3.9 billion in annual international aid to rebuild the economy.

The deal sends “a strong signal going into… the Afghan conference in Tokyo that we are back on track in terms of being able to support the NATO mission,” State Department spokeswoman Victoria Nuland said.

Clinton is due to attend the Tokyo talks, as some of the international focus now shifts to rebuilding in Afghanistan with almost all foreign combat troops due to withdraw by the end of 2014, some 13 years after the 2001 US invasion.

The US commander of NATO-led forces in Afghanistan, General John Allen, who held talks in Islamabad twice in the last six days, praised the deal as “a demonstration of Pakistan’s desire to help secure a brighter future for both Afghanistan and the region at large.”

Pakistan’s ambassador to the US, Sherry Rehman, also stressed that it showed Islamabad was “playing our role as responsible global partner in stabilizing the region.”

“We appreciate Secretary Clinton’s statement, and hope that bilateral ties can move to a better place from here,” she said.

While Islamabad had demanded a formal apology for the deaths of its border troops, a US and NATO investigation said the killings were the result of mistakes made on both sides.