Updated

The United States and NATO will formally end 13 years of war in Afghanistan with a ceremony at their military headquarters in Kabul.

The ceremony on Sunday will mark the end of the U.S.-led International Security Assistance Force, which will transition to a supporting role with 13,500 soldiers starting Jan. 1.

The mission ends with 2,224 American soldiers killed, of a total tally of some 3,500 foreign troop deaths. The mission peaked at 140,000 troops in 2010.

ISAF's draw-down will leave the Afghan security forces to battle with an intensifying insurgency as the Taliban have taken advantage of the departure of the foreign troops to spread their footprint across the country.

The United Nations says civilian casualties will hit 10,000 for the year, mostly caused by the Taliban.