United States president Barack Obama and Afghan president Hamid Karzai say they have agreed to speed up slightly the schedule for moving Afghanistan's security forces into the lead across the country, with US troops shifting fully to a support role.
The leaders also said Obama agreed to place battlefield detainees under the control of the Afghan government.
Obama, appearing at the White House with Karzai at his side, said accelerating the transition to Afghan security control this northern hemisphere spring would set the stage for further withdrawal of US and other foreign forces, although he did not say how quickly a US drawdown would be carried out this year and next. There are now 66,000 US troops there.
"Starting this spring our troops will have a different mission: training, advising and assisting Afghan forces," Obama said. "It will be a historic moment."
He added later that even in a backup role he could not rule out that US troops could be drawn into combat. But he emphasised that their main role would be support, such as training and advising.
Karzai said he was pleased by the agreement, in part because it means that by spring there will be no foreign troops in Afghan villages.
Asked about the decision to accelerate the transition to Afghan security control - a shift that previously was scheduled to happen this summer - Obama said it was not yet clear what it would mean for the pace of US troop withdrawals this year. He said that was "something that isn't yet fully determined" and is awaiting further internal deliberation.
Casting the move in a positive light, Obama said plans remain on schedule to have Afghan forces fully responsible for security nationwide by the end of December 2014 - with no backup, theoretically, by US or other international forces - at which point, "this war will come to a responsible end."
The capabilities of the Afghan army are "exceeding initial expectations," the two said in a joint statement released after their private meeting and working lunch and in advance of a joint news conference. As a result, Obama said he acceded to Karzai's desire to put Afghan forces in the combat lead across his country this spring, rather than wait until summer.
In their statement the leaders said they discussed the possibility of a continued US troop presence beyond December 2014, when the US and allied combat mission is to end. But they did not settle on any specifics.
The US now has 66,000 troops in Afghanistan.
US commanders in Afghanistan have proposed keeping 6,000 to 15,000 US troops after 2014 to continuing pursuing terrorists and training Afghan security forces. But the White House, which tends to favor lower troop levels than the generals do, says Obama would be open to pulling all US forces out of Afghanistan at the end of 2014.
"We wouldn't rule out any option," Ben Rhodes, Obama's deputy national security adviser, said earlier this week. "We're not guided by the goal of a certain number of US troops in the country. We're guided by the objectives that the president set - disrupt, dismantle, defeat al-Qaida."
The meeting was the first between Obama and Karzai since November's US presidential election. Heading into his second term, Obama is shaking up his national security team, including key players who deal with Karzai and the war.
Secretary of State Hillary Rodham Clinton and Defense Secretary Leon Panetta are both expected to leave their posts within weeks. The president nominated Senator John Kerry, a Democrat, as the nation's top diplomat and former Senator Chuck Hagel, a Republican, to lead the Pentagon.
Both Kerry and Hagel are likely to favour a more rapid withdrawal of US forces.
The US-led NATO coalition is aiming to turn all combat missions over to Afghan forces by the end of this year. The 66,000 US forces still there are already turning over territory or handing off many combat missions to the Afghans.
Still, the war's endgame is punctuated with uncertainty, beginning with doubts about whether the Afghan government can build legitimacy by credibly serving its population. Also in question is whether Afghan security forces will be capable of holding off the Taliban after international forces leave.