U.S. and Afghan officials said Wednesday they had resolved final disputes over the agreement on long-term American presence in Afghanistan .
The Wall Street Journal said the resolution came just hours before the Loya Jirga assembly was to consider the deal.
The breakthrough came after U.S. Secretary of State John Kerry spoke with Afghan President Hamid Karzai for the second straight day , the Journal said. The report said the crucial issue involved the circumstances under which U.S. troops could enter Afghan homes on counter-terror missions .
Kerry and Afghan officials confirmed the deal had been reached.
Only a day had remained before the Loya Jirga, made up of the country's tribal leaders, was to meet Thursday. The council's approval is essential to finalize the bilateral security agreement, which will determine how many U.S. troops remain in Afghanistan after the withdrawal of coalition forces by the end of 2014 and what role the residual U.S. force would play in Afghanistan.
There were mixed signals Tuesday on the draft agreement.
Aimal Faizi, a spokesman for Karzai, was quoted as saying the Afghan president had agreed in a last minute phone call, and U.S. President Barack Obama  would write a letter to the Afghan people acknowledging past mistakes in the conduct of the war, including civilian casualties.
However, U.S. National Security adviser Susan Rice , appearing on CNN's "Situation Room," said reports about the formal letter were false.
"No such letter has been drafted or delivered. There is not a need for the United States to apologize to Afghanistan," Rice said on the CNN program. "Quite the contrary, we have sacrificed and supported them in their democratic progress and in tackling the insurgents and al-Qaida. So that [letter of apology] is not on the table."
She termed the reports a "complete misunderstanding of what the situation is."
Separately, the Journal quoted U.S. officials as saying they saw the latest developments as last-minute political posturing by Karzai ahead of the Loya Jirga. They said Kerry in his telephone talk with Karzai didn't specify any intention to issue an apology. However, officials said it may be possible to send a letter expressing U.S. regret over civilian casualties in past military operations.
It was unclear if Kabul would allow counter-terror house searches only under "extraordinary circumstances" or if Karzai has already gotten a U.S. assurance to refrain from any action without first consulting Afghan authorities.
Another issue was granting immunity from local laws to U.S. troops for any crimes.
CNN, quoting two senior U.S. officials, reported Kerry declined an invitation to attend to the Loya Jirga, but offered to write a letter to the leaders offering U.S. assurances about a future security relationship.