Just say you’re sorry. That’s all it will take for the United States to keep its military presence in Afghanistan beyond 2014—for up to another 10 years, in fact, according to Afghan officials.

After months of negotiations between Washington and Kabul, Afghanistan’s top leader, President Hamid Karzai, reportedly signaled to the U.S. that he would support a continuation of the American military mission in his country beyond next year, and even accept U.S. Special Forces raiding private homes.

But Karzai wanted something first: a letter from President Barack Obama apologizing for the harm that U.S. forces have brought on Afghan civilians over the past 12 years.

If Obama agreed, Karzai would encourage the loya jirga, a council of more than 2,500 elders and officials, to vote for the new security pact between the U.S. and Afghanistan.

Publicly, the Obama administration denied that Obama intended to offer any apology to Karzai.

Susan Rice, the national security adviser, told CNN: “No such letter has been drafted or delivered….There is not a need for the United States to apologize to Afghanistan. Quite the contrary. We have sacrificed and supported them in their democratic progress and in tackling the insurgency and Al Qaeda.”

But, privately, a senior State Department official told The New York Times that a letter was in the works that would acknowledge past problems, such as civilian casualties.

“We will consider his request for reassurances, including the option of a letter from the administration stating our position,” the official told the Times on condition of anonymity.

A spokesman for Karzai said the letter is expected to “mention that there were mistakes made in the conduct of military operations in the past, in the conduct of military operations by United States forces in the last decade, and that Afghans have suffered, and that we understand the pain and therefore we give assurances and make sure those mistakes are not repeated,” according to the Times.

The new security agreement would allow American raids to search and detain militants within Afghan homes, but only under “extraordinary circumstances” to save the lives of U.S. soldiers. Such raids on private homes are said to be extremely offensive to Afghan citizens.

The only other sticking point had been the U.S. demand that its troops be immune from Afghan prosecution for any actions they take in the country. Karzai has reportedly now acquiesced on this matter.

Thousands of American troops could remain in Afghanistan, if both sides approve the deal, which could result in the U.S. spending billions of dollars more on fighting the insurgency.

A draft document (pdf) obtained by NBC News showed the agreement would begin on January 1, 2015, and “remain in force until the end of 2024 and beyond.”