CHICAGO — President Barack Obama and leaders around the globe locked in place an Afghanistan exit path Monday that will still keep their troops fighting and dying there for two more years, acknowledging there never will be point at which they can say, "This is all done. This is perfect."
Obama, presiding over a 50-nation war coalition summit in his hometown, summed up the mood by saying the Afghanistan that will be left behind will be stable enough for them to depart — essentially good enough after a decade of war— but still loaded with troubles.
The war that began in the weeks after the Sept. 11, 2001, attacks will finish at the end of 2014.
"I don't think there's ever going to be an optimal point where we say, 'This is all done. This is perfect. This is just the way we wanted it,' " Obama said as the NATO summit closed. "This is a process, and it's sometimes a messy process."
Obama never spoke of victory.
Afghan forces for the first time will take over the lead of the combat mission by the middle of 2013, a milestone moment in a long, costly transition of control. Even in a backup role, U.S. forces and all the rest will face surprise attacks and bombings until the war's end.
Wary of creating a vacuum in a volatile region, the nations also promised a lasting partnership with Afghanistan, meaning many years of contributing tax dollars, personnel and political capital after the end of their soldiers' combat.
The United States has already cut its own deal with Afghanistan along those lines, including a provision that allows U.S. military trainers and special operations troops to remain in Afghanistan after the war closes.
In an escalating election-year environment, Obama was at the center of the action in Chicago, beaming and boasting about the city's performance in hosting the event. Noisy protesters loaded the city's streets at times, which Obama called just the kind of free expression NATO defends.
Tensions with Pakistan undermined some of the choreographed unity. Pakistan has not yet agreed to end the closure of key transit routes into Afghanistan — retaliation for American airstrikes that accidentally killed 24 Pakistani soldiers months ago — and the issue hung over the summit.
Obama had no official talks with Pakistani President Asif Ali Zardari, although the two chatted briefly. Obama spoke of progress on the standoff but he added: "I don't want to paper over real challenges there. There's no doubt that there have been tensions."
On Afghanistan, led by Obama, the partners are in essence staying the course. They stuck with a long-established time line and underscored that there will be no second-guessing the decision about when to leave.
Since 2010, they have been planning to finish the war at the end of 2014, even as moves by nations such as France to pull combat troops out early have tested the strength of the coalition. The shift to have Afghan forces take the lead of the combat mission next year has also been expected. Leaders presented it as a significant turning point in the war.
It will be "the moment when throughout Afghanistan people can look out and see their own troops and police stepping up to the challenge," said the NATO chief, Secretary-General Anders Fogh Rasmussen.
What the world is poised to leave behind is an Afghanistan still riddled with poverty, corruption and political instability.
Questioned about what will happen if Afghanistan eventually falls apart, Obama signaled there is no turning back. "I think that the timetable that we've established is a sound one, it is a responsible one. Are there risks involved in it? Absolutely."
British Prime Minister David Cameron said the leaders were "making a decisive and enduring commitment to the long-term future of Afghanistan.''
"The message to the Afghan people is that we will not desert them. And the message to the insurgency is equally clear: You cannot win on the battlefield. You should stop fighting and start talking," Cameron said.
NATO said it will keep providing "long-term political and practical support" to Afghanistan after 2014 but added: "This will not be a combat mission."
The alliance agreed on a fundraising goal to underwrite the Afghan armed forces after the international fighting forces leave.
The force of about 230,000 would cost about $4.1 billion annually — the bulk of it paid by the United States and countries that have not been part of the fighting force.
U.S. and British officials said during the summit that pledges total about $1 billion a year so far and that fundraising is on track to make up the rest. French President Francois Hollande said the United States had requested a little less than $200 million but was non-committal, saying France was "not bound by what Germany or other countries might do."