Updated

President Obama and Afghan President Hamid Karzai on Friday endorsed the opening of a "Taliban office" in a third-party country to "facilitate" reconciliation talks -- just one plank of the post-war plan the two leaders discussed during Karzai's visit to Washington.

The two also agreed to speed up slightly the schedule for moving Afghanistan's security forces into the lead across the country, with U.S. troops shifting fully to a support role by spring rather than summer. The capabilities of the Afghan army are "exceeding initial expectations," the two said in a joint statement released after their private White House meeting.

"The transition is well underway," Obama said at a joint press conference Friday. He stressed that the U.S. is still on course to bring the war "to a responsible end" by the end of 2014, handing full responsibility for security over to the Afghans by that point.

Until then, Obama said U.S. troops will still be fighting but will, by spring, put the Afghans in the lead.

"The nature of our work will be different. We will be in a training, assisting, advising role," Obama said, adding that U.S. troops will still be in "harm's way."

More On This...

While the two sides work out the specifics of the U.S. troop drawdown -- and how many troops, if any, might remain after 2014 -- Obama and Karzai also formally endorsed the opening of a "Taliban office" in Qatar.

Obama said the purpose would be to facilitate talks between the Afghan government and the Taliban. The U.S. earlier had gotten behind Afghan-led negotiations with some factions of the Taliban, though this is the first time the two leaders have formally endorsed an official Taliban office.

The Taliban continue to fuel unrest in the region, though. Their Pakistan affiliate was linked to the attempted Times Square bombing in 2010. The group continues to commit brutal attacks on civilians. Referring to the Afghan side of the border, Obama nevertheless said that the Taliban have been driven out of their strongholds in most major cities.

In their statement, the leaders said they discussed the possibility of a continued U.S. troop presence beyond December 2014, when the U.S. and allied combat mission is to end. But they did not settle on any specifics. Obama, asked by a reporter about what that footprint might look like, said he was still gathering recommendations from the Pentagon.

The U.S. now has 66,000 troops in Afghanistan.

U.S. commanders in Afghanistan have proposed keeping 6,000 to 15,000 U.S. 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 U.S. 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 U.S. troops in the country. We're guided by the objectives that the president set -- disrupt, dismantle, defeat Al Qaeda."

Friday's meeting was the first between Obama and Karzai since November's U.S. 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 Sen. John Kerry, D-Mass., as the nation's top diplomat and former Sen. Chuck Hagel, R-Neb., to lead the Pentagon.

Both Kerry and Hagel are likely to favor a more rapid withdrawal of U.S. forces.

After Karzai met Thursday with Clinton and Panetta, the Pentagon chief offered an upbeat assessment of the war's progress.

"After a long and difficult path, we finally are, I believe, at the last chapter of establishing an Afghanistan, a sovereign Afghanistan, that can govern and secure itself for the future," Panetta said.

The U.S.-led NATO coalition is aiming to turn all combat missions over to Afghan forces by the end of this year. The 66,000 U.S. 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.

Panetta told a news conference that he and Karzai had laid the groundwork for the Afghan leader's White House meeting.

"We made very good progress on, you know, the kind of equipment that we would try to make available to them," to enable the Afghans to not only secure their borders but also prevent a Taliban takeover, Panetta said.

The Associated Press contributed to this report.