The accord on Ground Location Of Communication (GLOC) between Pakistan and the United States was reached on Monday in Islamabad after weeks of behind-the-scenes phone calls, e-mails and meetings between one of Mrs. Clinton’s deputies, Thomas R. Nides, and a top Pakistani diplomat Sherry Rehman and the Minister for Finance Hafeez Sheikh, American and Pakistani officials were quoted by New York Times as saying.

Mrs. Clinton and her top aides, working closely with senior White House and Pentagon officials, carefully calibrated what she would say in her phone call to Ms. Khar to avoid an explicit mention of what one top State Department official called “the A-word”  “apology.” Instead, Mrs. Clinton opted for the softer “sorry” to meet Pakistan’s longstanding demand for a more formal apology for the airstrikes.

Mr. Nides and Pakistan’s finance minister, Abdul Hafeez Shaikh, were designated by their governments to begin negotiating. Mr. Nides, a former executive at Morgan Stanley, and Mr. Shaikh hit it off, and began swapping e-mails and phone calls to work out a political deal.

Last weekend, Mrs. Clinton telephoned her congratulations to Pakistan’s new prime minister, Raja Pervez Ashraf. But it was Mrs. Clinton’s increasingly cordial relationship with the young Pakistani foreign minister, Ms. Khar, 34, that paid dividends in resolving the dispute, American officials said.

Several weeks ago, Mrs. Clinton began working on drafts of the statement she released on Tuesday, and at one point began discussing the language with Ms. Khar, a person with knowledge about the process said. “This was jointly done,” said the person, who, like half a dozen other officials from both countries, spoke on condition of anonymity because of diplomatic protocols.

Also over the weekend, Mr. Nides arrived in Islamabad, joined by Gen. John R. Allen, the American commander of NATO forces in Afghanistan, and James N. Miller, the Pentagon’s top policy official, for meetings with their Pakistani counterparts. On Monday, they put the finishing touches on the agreement. “The Nides visit this past weekend pushed it over the line,” one senior American official said.

But government officials were at pains to claim that the accord had never hinged on higher fees. “I am glad that this breakthrough is not part of any transaction,” said Sherry Rehman, Pakistan’s ambassador to the United States. “We are playing our role as responsible global partner in stabilizing the region.”

Los Angeles Times said the closure of the Pakistani roads cost an extra $100 million monthly because it forced the Pentagon to instead move supplies by air, rail or truck through Russia and other countries north of Afghanistan, much longer and more expensive routes, Defense Secretary Leon E. Panetta told Congress last month.

The road closures also held up delivery of thousands of armored vehicles and other equipment meant for the fledgling Afghan army and police, slowing U.S. efforts to build Afghan forces that can stand up to the Taliban insurgency as foreign troops withdraw.

The Pakistanis have told their American counterparts that at least 77 supply trucks would cross the border Wednesday and build up to normal distribution levels, according to U.S. officials.

According to Washington Post, US 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.