Karzai on February 24 ordered American special forces to leave Wardak, a hotbed of Taliban activity on the doorstep of Kabul, within two weeks.
The Afghan government accused Afghans working alongside the US troops of torture and murder, and said that this has incited local hatred.
In recent weeks Karzai has staked out increasingly nationalist ground, deepening a war of words that threatens to derail NATO attempts to ensure a smooth security transition before most Western troops leave next year.
But the agreement, which left many questions unanswered and made no explicit mention of special forces, will be seen as a compromise for Karzai and as a further sign of his government's reliance on the US-led coalition.
Only hours earlier, Karzai's office branded NATO military operations "aimless and unwise". But he had already backtracked on his two-week deadline, giving US commanders more time to negotiate the security handover in Wardak.
"I am pleased to announce that following a very constructive series of talks... we have come to agreement on a plan for Wardak," said General Joseph Dunford, the US commander of NATO troops, following talks with Karzai.
The US-led International Security Assistance Force (ISAF) said Afghan forces would "soon" move into the district of Nerkh, which "will preclude" the need for coalition forces and Afghan Local Police, a controversial, US-trained unit, to remain in the area.
But Nerkh is only one of eight districts in Wardak. ISAF said the "remainder of the province will transition over time" but no dates were announced and Afghan officials contacted by AFP were tight-lipped on the details.
The ISAF statement did not make any specific mention of US special forces, although Dawlat Waziri, a spokesperson for the defence ministry, told AFP that they would leave Nerkh "within a few days".
British Lieutenant General Nick Carter, ISAF's deputy commander, later said the change applied only to the Nerkh district and that coalition forces would continue to operate in other parts of the province.
"Given the political dynamics in Nerkh and the background there, it's going to be transitioned to an Afghan solution during the course of the next few days," pending a decision from top Afghan officials, Carter told reporters.
"Elsewhere in Wardak, it's business as usual and it's no change," he said, via a video link to Washington from Kabul.
But Carter would not say whether some ISAF or special forces might remain in Nerkh district.
The US military said it had found no evidence to back the allegations that Afghan militia working with US forces had tortured and murdered civilians.
A deputy spokesperson for Karzai welcomed the agreement.
"This has been the true demand of Afghan people and president. We welcome the agreement and we expect that it will be finalised as agreed," said Adela Raz.
Relations between Karzai and Washington have been increasingly troubled, with the bulk of NATO's 100,000 combat soldiers due to leave by the end of next year.
The United States, which provides 66,000 of the total, was stunned by the accusations this month from Karzai, who accused the US of colluding with the Taliban to justify its presence in the country.
Many analysts say Karzai, who rose to power with US support after the fall of the Taliban regime, is desperate to shake off allegations that he is a "puppet" president controlled by foreigners.
But some said Wednesday's deal exposed the contradiction between Karzai's anti-American comments in public and his dependence on his Western allies.
"I believe this agreement is a face-saver for the president, but it could also be a sign that he has now realised he cannot go on safe and sound with his tough stance against the Americans," said author Ahmad Saeedi.
"For now this is a win-win for both sides," said Waheed Mujhda, a political commentator who served in the Taliban government of 1996-2001.
"But the truth is American forces have only agreed to quit one district and it is still a long way until the Americans leave the whole province," he said.
Others have raised concerns about a swift coalition exit from Wardak, which if not secured could expose Kabul to greater risk of Taliban infiltration.
Casualty statistics have risen sharply among Afghan forces as they have taken on a greater role under the phased NATO withdrawal.
COMMENTS (1)
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ
the special forces those were are doing their activity for real they were killing and torturing innocent people. I support Karzai plan and withdrawing of U.S Special forces......