TALLINN, Estonia - Fearful of losing public support for the war in Afghanistan, the U.S. and NATO on Friday agreed to start transferring control of the country back to its leaders by year's end but acknowledged that achieving stability will take decades.

If successful, the transition plan approved by U.S. Secretary of State Hillary Rodham Clinton and representatives of the 27 other NATO countries would enable President Barack Obama to meet his target date of July 2011 for starting to bring American troops home.

The stakes are high. If the plan fails, public support in Europe, the United States and among Afghans themselves could further erode or even collapse.

Much depends not only on improved NATO military performance but also on political reconciliation between the Taliban and the Afghan central government. The allies must quickly improve the training and performance of the Afghan army and police, and strengthen Afghan institutions weakened by decades of conflict.

Clinton on Friday offered an optimistic assessment of the approach, which NATO hopes Afghan President Hamid Karzai will endorse in July at an international conference in Kabul.

Once approved, NATO would officially implement the plan at a summit, possibly in conjunction with a public announcement of the first provinces to be transferred to Afghan control, said Mark Sedwill, the senior NATO civilian in Kabul.

"We believe that with sufficient attention, training and mentoring, the Afghans themselves are perfectly capable of defending themselves against insurgents," Clinton told a news conference. "Does that mean it will be smooth sailing? I don't think so. Look at Iraq."

Asked whether any plan to turn power over to Afghanistan's sometimes dysfunctional, corrupt and resource-poor government was viable, Sedwill told reporters: "It's far from certain."

Two U.S. soldiers and five insurgents died in a gunbattle while searching a compound in eastern Afghanistan, NATO said Friday. As of Friday, at least 961 members of the U.S. military had died in Afghanistan, Pakistan and Uzbekistan as a result of the U.S. invasion of Afghanistan in late 2001, according to an Associated Press count.

Latest videos