Pakistan agreed Tuesday to reopen its border crossings to U.S. and NATO military transit after Secretary of State Hillary Rodham Clinton apologized for a deadly U.S. airstrike last year.

The moves ended a seven-month diplomatic standoff and raised hopes within the Obama administration that the Pakistanis are ready to expand counterterrorism cooperation.

The White House had resisted Pakistan’s insistence on an explicit apology for the deaths of 24 Pakistani soldiers in the November airstrike. But a flurry of meetings in recent days led to Clinton issuing an artfully worded statement saying she had spoken with her counterpart in Islamabad and agreed that mistakes were made on both sides.

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

Although the language expressed mutual regret, the statement was quickly billed in Pakistan as a unilateral apology, an interpretation that the Obama administration was content to leave undisputed.

“Everyone hopes this will open the doors to other cooperation with them on counterterrorism and Afghanistan,” a senior administration official said. “That’s yet to be seen. I think we should take it for what it is and go from there.”

Disagreements remain over militant sanctuaries in Pakistan, cross-border attacks by extremists in Pakistan and Afghanistan, U.S. drone strikes in Pakistani territory and reconciliation with the Taliban.

But for the moment, both sides are clearly relieved that the most visible evidence of the breach in their always-tense relationship — the miles of stalled U.S. military container trucks awaiting passage to Afghanistan — would soon disappear. U.S. officials said they expected the first vehicles to cross the newly opened border by early Wednesday.

In recent months, the United States has spent at least an additional $100 million a month to use an alternative, northern route across Central Asia. That cost had been expected to increase as the massive withdrawal of U.S. troops and equipment from Afghanistan accelerated.

Both sides yielded ground, but the dispute finally ended because “the two countries agreed we need to move beyond this issue,” said a source knowledgeable about the negotiations. “These things need time.”

U.S. officials spoke on the condition of anonymity about the negotiations, saying they would not publicly discuss anything beyond Clinton’s statement.

Pakistan’s Defense Committee of the Cabinet, which approved the deal, said the agreement was in the country’s best interest and a boon to the Afghanistan peace process. Allowing NATO convoys to enter and exit Pakistani territory would speed the withdrawal of Western forces, the Islamabad government said in a statement, and “enable a smooth transition in Afghanistan.”

The cabinet meeting, chaired by Prime Minister Raja Pervez Ashraf, included the powerful army chief, Gen. Ashfaq Kayani, and the director of the Inter-
Services Intelligence agency, Lt. Gen. Zaheer ul-Islam. Ashraf opened the meeting by calling Pakistan “a responsible member of the international community” and saying that continued closure of NATO supply lines would “impinge” on Pakistan’s international relationships.

Information Minister Qamar Zaman Kaira, pressed by reporters on the language in Clinton’s statement, dismissed what he called “this useless issue of which word has been used. The reality is that the nation has been able to bring the world superpower to offer an apology.”

‘It was a matter of pride’

In her statement, Clinton noted that Pakistan would not charge any new fees for the containers, an issue that had dominated the drawn-out negotiations at one point, with Pakistan insisting on a payment of $5,000 per truck.

“This is a tangible demonstration of Pakistan’s support for a secure, peaceful and prosperous Afghanistan and our shared objectives in the region” and will result in “a much lower cost” for withdrawing U.S. troops, Clinton said.

About 90,000 American combat troops, and 40,000 from NATO and other countries, are due to leave Afghanistan by the end of 2014.

The senior administration official said U.S. negotiators had told Pakistan that they would notify Congress to release more than $1 billion in withheld funds for Pakistani counterterrorism operations. Pakistan has said that it is owed more than $3 billion as part of an existing U.S. agreement to reimburse Pakistan for its expenses.

But money was never the main issue, Pakistani analysts said. “It was a matter of honor for the army,” said Laiq ur-Rehman, defense correspondent for ARY News, a cable channel. “The only word they were looking for was ‘sorry.’ It was a matter of pride, a matter of honor, a matter of ego.”

“If it had been about the money, it would have been done months ago,” said the source knowledgeable about the negotiations. “Just like for us, it was not just about the supply routes.”

Drawn-out negotiations

Final agreement on the wording of Clinton’s statement came after a week of marathon talks that included two trips to Islamabad by Gen. John R. Allen, the U.S. commander in Afghanistan, and a quickly arranged weekend trip by Thomas R. Nides, the deputy secretary of state for management and resources. In recent weeks, Nides and Pakistani Finance Minister Abdul Hafeez Shaikh had spearheaded the negotiations.

The senior administration official said that agreement on financial issues was reached last week and that the wording of the statement was decided Monday. “Everybody had been circling around this for some time,” the official said. “It took everybody to say, ‘Okay, let’s do this.’ ”

On the U.S. side, the White House and the Pentagon had long rebuffed State Department entreaties to utter what one U.S. diplomat called “the ‘sorry’ word.” They insisted that an apology was not merited because both countries were at fault in the Nov. 26 incident. A U.S. military investigation said the soldiers’ deaths were inadvertent and resulted from a skirmish in which the Pakistanis fired first at U.S. ground forces near the border in Afghanistan. Pakistan has disputed that conclusion, saying its forces did not fire first.

Although the Pakistani military had publicly deferred to the civilian government in Islamabad to make a decision on the border closings — and a parliamentary committee determined that an apology was necessary — Allen and Nides held private meetings with Kayani before the final deal was reached.

Allen issued a statement Tuesday that was similar to Clinton’s, calling the agreement “a demonstration of Pakistan’s desire to help secure a brighter future for both Afghanistan and the region at large.”

But the decision also carries the prospect of another public backlash in Pakistan, where opposition to U.S. policies remains strong.

As the container trucks got ready to move, the Defense Council of Pakistan, a coalition of Islamic parties that includes pro-Taliban clerics and other foes of the NATO routes, vowed civil disobedience to stop the convoys.

“The decision to reopen NATO supplies is a big crime against the country, and we will not sit silently over this,” retired Lt. Gen. Hamid Gul, a leader of the group and a former chief of the Inter-Services Intelligence agency, told the Pakistani cable channel Express News. “We will come to roads and streets and protest against the decision and will also try to stop the supplies.”

Leiby reported from Islamabad.