The war in Afghanistan came to a formal end Sunday with a flag lowering ceremony in Kabul, The Associated Press reported.

The green-and-white flag of the International Security Assistance Force was rolled up, and the flag of the new international mission called "Resolute Support" was hoisted, marking the transition of the fighting from U.S.-led combat troops to the country's own security forces.

"Resolute Support will serve as the bedrock of an enduring partnership" between NATO and Afghanistan, said U.S. Gen. John Campbell, commander of ISAF. "The road before us remains challenging, but we will triumph."

About 13,000 foreign troops, mostly Americans, will remain in Afghanistan under the new two-year mission, Reuters reported.

The Afghan army continues to struggle in its fight against Taliban militants, who have killed record numbers of Afghans this year alone.

"Today marks an end of an era and the beginning of a new one," Campbell said.

The late al-Qaida leader Osama bin Laden had strong relations with the Taliban, who let him and other members hide out in Afghanistan. Since 2001, more than 3,000 soldiers have died in the Afghan war, including more than 2,000 Americans.

Campbell commemorated the 3,500 soldiers killed on Afghan battlefields at the ceremony and praised the country's army for giving him confidence that it would be able to take on the fight alone.

Yet, Taliban spokesman Zabihullah Mujahid called Sunday's event a "defeat ceremony."

"Since the invasion in 2001 until now, these events have been aimed at changing public opinion, but we will fight until there is not one foreign soldier on Afghan soil and we have established an Islamic state," he said

"At least in the past 13 years we have seen improvements in our way of life, freedom of speech, democracy, the people generally better off financially," 42-year-old shop keeper Gul Mohammad said.

Afghans have mixed feelings of the drawdown of foreign troops because they may be needed to bring peace after more than 30 years of continual war.