Afghan policemen keep watch in the area where thousands of Afghan tribal and political leaders will gather this week to decide whether to allow U.S. troops to stay after the 2014 drawdown of foreign forces. (Omar Sobhani/Reuters)

A last-minute hitch in the agreement over a post-2014 U.S. military presence in Afghanistan appeared to have been resolved Tuesday as the United States agreed to put certain assurances in a letter to Afghans that is likely to be signed by President Obama, U.S. and Afghan officials said.

The assurances will include a pledge that U.S. troops will enter Afghan homes only in exceptional circumstances to save lives, as well as what has become a standard U.S. expression of regret for Afghan suffering and the loss of innocent lives in the 12-year-old war.

The proposed letter is to be read to an assembly, called a loya jirga, of more than 2,500 Afghan elders and officials, scheduled to start Thursday in Kabul, that will consider whether to endorse the long-term security agreement with the United States. Obama’s final decision on signing the letter will depend on wording that is still under discussion.

The president “is not averse to signing,” said a senior administration official, one of several who discussed the talks on the condition of anonymity. “One way or the other,” the official said, “it’s going to be worked out in the next 24 hours.”

Early Wednesday, in an indication that the situation remains unsettled in Kabul, however, top officials participating in the loya jirga abruptly canceled a scheduled news conference outlining the five-day event. On Tuesday night, Afghan President Hamid Karzai warned that he would push off the finalization of the agreement until spring if his conditions were not met.

The agreement was completed in draft form in recent weeks, and U.S. lawmakers have been briefed on its terms. But during talks over the last few days with James B. Cunningham, the U.S. ambassador to Afghanistan, and Marine Gen. Joseph F. Dunford Jr., the commander of U.S. forces in the country, Karzai raised new concerns about the issue of home entry and the need for what Afghans term a U.S. “apology” for past mistakes. Both issues are long-standing Afghan complaints that predate the current negotiations.

U.S. officials said they recognize Karzai’s need for what one called “political cover” on issues that are likely to be raised in the assembly and for evidence that he had taken a hard negotiating line with the Americans. The officials said the requested assurances were not seen as a significant shift in the substance of the deal.

Afghans have long objected to the entry of U.S. troops into their homes, particularly on “night raids,” or surprise assaults to find suspected insurgents.

Susan E. Rice, Obama’s national security adviser, took sharp exception late Tuesday to reports of a U.S. “apology,” telling CNN that “there is not a need for the United States to apologize to Afghanistan” after “we have sacrificed and supported them.” White House spokesman Jay Carney noted, however, that the United States “always expresses regret when civilians are killed,” adding that “it’s not a new issue in our relationship.”

Expressions of regret for civilian deaths in mistargeted U.S. attacks were offered in 2008 by then-defense secretary Robert M. Gates, in 2009 by then-secretary of state Hillary Rodham Clinton, and in 2010 by Gen. Stanley A. McChrystal , then the U.S. commander in Afghanistan. In 2011, Lt. Gen. David Rodriguez, the deputy U.S. commander, offered “my sincere apology for the killing of nine children” who were gunned down by U.S. attack helicopters, and Obama, according to Karzai, conveyed “deep regret” for the incident in a call to the Afghan president. Last year, Gen. John R. Allen, the U.S. commander in Afghanistan at the time, apologized when 18 civilians were killed in a NATO airstrike.

The administration is eager to conclude the agreement before the Afghan electoral campaign, which started this month, gets fully underway and an April vote installs a new president. Planning for a long-term U.S. civilian presence in Afghanistan and agreement by other NATO countries to maintain troops there after 2014 have been held in abeyance pending a U.S. military deal.

U.S. exasperation with the ups and downs of negotiations in the past several months led the administration at several points to threaten a complete withdrawal. What was considered the most substantive hurdle — whether U.S. troops would have immunity from prosecution by Afghan courts in the event of wrongdoing — was settled with language saying that the United States would have legal jurisdiction over U.S. military personnel and Defense Department civilians.

Similar negotiations with Iraq in 2011 faltered on the immunity issue and led to a complete withdrawal at the end of that year.

The draft agreement with Afghanistan does not specify the number of troops the United States would leave behind to advise and train Afghan forces, as well as to conduct ongoing counterterrorism operations, after the final combat withdrawal in December 2014. Most estimates have put the number at 5,000 to 10,000, and the agreement has no expiration date.

The fix for the impasse was suggested early Tuesday by Secretary of State John F. Kerry during a telephone call with the Afghan president. Karzai first proposed that Kerry travel to Kabul and “defend his country’s proposal” in an address to the loya jirga, according to Karzai spokesman Aimal Faizi.

Kerry said that he could not attend but that “we would like to write a letter to participants that acknowledges Afghans have suffered in the past 12 years during the operations, and we want to make sure this does not happen again,” according to Faizi.

Karzai suggested that Obama sign the letter.

In a statement late Tuesday, Karzai said Kerry offered to limit U.S. troops’ entry into Afghan homes to “exceptional and special cases.” The statement also said that if such assurances were not made, the signing of the agreement would be delayed until after the presidential election.

A senior State Department official more or less agreed with the Afghan account, saying that Kerry had “conveyed it would not be possible for him to attend this week.” Karzai then “asked for reassurances that he could communicate to the loya jirga regarding the nature of our security relationship going forward and addressing past issues such as civilian casualties.”

Kerry said that request would be considered, “including the option of a letter from the administration stating our position” and “conveyed that it was important to move forward given the need for certainty and for the United States and our partners to plan ahead,” according to the State Department official.

When Karzai proposed a letter from Obama, the official said, Kerry responded, “Let me check.”

Craig reported from Kabul. Sayed Salahuddin in Kabul and Phil Rucker in Washington contributed to this report.