Updated

Marine Gen. Joseph Dunford took over Sunday as the new and probably last commander of all U.S. and international forces in Afghanistan.

The American-led NATO coalition is entering the final stretch of its participation in a war that will have lasted more than 13 years when most foreign combat troops pull out at the end of 2014.

Dunford took over leadership of the International Security Assistance Force, and a smaller but separate detachment of American troops, from Marine Gen. John Allen, who had led them for the past 19 months.

"Today is not about change, it's about continuity," Dunford told a gathering of coalition military leaders and Afghan officials. "What's not changed is the growing capability of our Afghan partners, the Afghan national security forces. What's not changed is our commitment, more importantly, what's not changed is the inevitability of our success."

He takes charge at a critical time for President Barack Obama and the military. NATO decided at its 2010 summit in Lisbon to withdraw major combat units, but to continue training and funding Afghan troops and leave a residual force to hunt down Al Qaeda and other terrorist groups.

Gen. Martin Dempsey, chairman of the U.S. Joint Chiefs of Staff, said "much work lies ahead" for Dunford as he tries to meet those objectives while at the same time withdrawing about 100,000 foreign troops, including 66,000 from the United States.

Dunford, from Boston, Massachusetts, will face serious challenges as he tries to accommodate an accelerated timetable for handing over the lead for security responsibility to Afghan forces this spring — instead of late summer as originally planned.

"I told him our victory here will never be marked by a parade or a point in time on a calendar when victory is declared. This insurgency will be defeated over time by the legitimate and well-trained Afghan forces that are emerging today and who are taking the field in full force this spring," Allen said.

He added that success would be described as an "Afghan force defending Afghan people, and enabling an Afghan government to serve its citizens. This is victory; this is what winning looks like."

Although the Afghan security forces are almost at their full strength of 352,000, it is unclear if they are yet ready to take on the fight by themselves.

Before departing, Allen admitted that the Afghans still need much work to become an effective and self-sufficient fighting machine, but he said a vast improvement in their abilities was behind a decision to accelerate the timetable for putting them in the lead nationwide this spring when the traditional fighting season begins.

Obama said last month that the Afghans would take over this spring instead of late summer — a decision that could allow the speedier withdrawal of foreign forces from Afghanistan.

It is also unclear when the remaining 66,000 U.S. troops would return home, or how many American soldiers will remain after the end of 2014.

Obama may use his State of the Union address on Tuesday to announce the next steps for concluding the war and a timetable for withdrawal along with plans for a residual force post-2014.

Much of that depends on the U.S. negotiating a bilateral security agreement with the government that includes the contentious issue of immunity from Afghan prosecution for any U.S. forces that would remain here after 2014. President Hamid Karzai has said he will put any such decision in the hands of a council of Afghan elders, known as a Loya Jirga.

Although Dempsey said earlier in the week that the United States had plans to leave a residual force, a failure to strike a deal on immunity would torpedo any security agreement and lead to a complete pullout of U.S. forces after 2014 — as it did in post-war Iraq. It is widely believed that no NATO-member nation would allow its troops to remain after 2014 to train, or engage in counterterrorism activities, without a similar deal.

The head of NATO joint command in Europe, German Gen. Hans-Lothar Domrose, said the alliance was already making plans for a post-2014 presence, plans he said that were "all well advanced."

Allen, 59, of Warrenton, Virginia, was the longest serving ISAF commander so far. Nearly two dozen generals have commanded troops from the United States and ISAF since the American invasion in late 2001 — with six U.S. generals including Dunford running both commands in the past five years alone.

Also attending the ceremony were U.S. Marine Corps Gen. James N. Mattis, Commander, U.S. Central Command, and Gen. James Amos, head of the Marine Corps. Karzai did not attend.