KABUL, Afghanistan — The war in Afghanistan, fought for 13 bloody years and still raging, came to a formal end Sunday with a quiet flag-lowering ceremony in Kabul that marked the transition of the fighting from U.S.-led combat troops to the country's own security forces.
In front of a small, hand-picked audience at the headquarters of the NATO mission, the green-and-white flag of the International Security Assistance Force was ceremonially rolled up and sheathed, and the flag of the new international mission called Resolute Support was hoisted.
U.S. Gen. John Campbell, commander of ISAF, commemorated the 3,500 international soldiers killed on Afghan battlefields and praised the country's army for giving him confidence that they are able to take on the fight alone.
"Resolute Support will serve as the bedrock of an enduring partnership" between NATO and Afghanistan, Campbell told an audience of Afghan and international military officers and officials, as well as diplomats and journalists.
"The road before us remains challenging, but we will triumph," he added.
Beginning Jan. 1, the new mission will provide training and support for Afghanistan's military, with the U.S. accounting for almost 11,000 of the 13,500 members of the residual force.
"Thanks to the extraordinary sacrifices of our men and women in uniform, our combat mission in Afghanistan is ending, and the longest war in American history is coming to a responsible conclusion," U.S. President Barack Obama said in a statement issued in Hawaii, where he is on vacation with his family.
Afghan President Ashraf Ghani, who took office in September, signed bilateral security agreements with Washington and NATO allowing the ongoing military presence. The move has led to a spike in violence, with the Taliban claiming it as an excuse to step up operations aimed at destabilizing his government.
ISAF was set up after the U.S.-led invasion as an umbrella for the coalition of around 50 nations that provided troops and took responsibility for security across the country. It ends with 2,224 American soldiers killed, according to an Associated Press tally.
The mission, which was initially aimed at toppling the Taliban and rooting out al-Qaida following the Sept. 11, 2001 attacks, peaked at 140,000 troops in 2010. Obama ordered a surge to drive the insurgents out of strategically important regions, notably in the southern provinces of Helmand and Kandahar, where the Taliban had its capital from 1996 to 2001.
Taliban spokesman Zabihullah Mujahid called Sunday's event a "defeat ceremony" and said the insurgents' fight would continue.
"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.
Obama recently expanded the role of U.S. forces remaining in the country, allowing them to extend their counter-terrorism operations to the Taliban, as well as al-Qaida, and to provide ground and air support for Afghan forces when necessary for at least the next two years.
In a tacit recognition that international military support is still essential for Afghan forces, national security adviser Mohammad Hanif Atmar told the gathered ISAF leaders: "We need your help to build the systems necessary to ensure the long-term sustainability of the critical capabilities of our forces."
Afghans have mixed feelings about the drawdown of foreign troops. With the deteriorating security situation, many believe the troops are needed to back up the Afghan effort to bring peace after more than three decades of continual war.
"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," said 42-year-old shop keeper Gul Mohammad.
But the soldiers are still needed "at least until our own forces are strong enough, while our economy strengthens, while our leaders try to form a government," he said.
NATO Secretary General Jens Stoltenberg has said that Afghanistan's 350,000-member security forces are ready to take on the insurgency alone, despite complaints by officials that they lack the necessary assets, such as air support, medical evacuation systems and intelligence.
On Sunday, he said that ISAF's mandate was "carried out at great cost but with great success."
"We have made our own nations safer by denying safe haven to international terrorists. We have made Afghanistan stronger by building up from scratch strong security forces. Together we have created the conditions for a better future for millions of Afghan men, women and children," he said.
As Afghan forces assume sovereignty, the country is without a Cabinet three months after Ghani's inauguration, and economic growth is near zero due to the reduction of the international military presence and other aid. The United States spent more than $100 million on reconstruction in Afghanistan, on top of the $1 trillion war.
This year is set to be the deadliest of the war, according to the United Nations, which expects civilian casualties to hit 10,000 for the first time since the agency began keeping records in 2008. Most of the deaths and injuries were caused by Taliban attacks, the U.N. said.
Two teenage boys were killed late Saturday in the eastern Wardak province when a rocket was fired near a children's volleyball match, an official said. Another five children, ages 11 to 14, were wounded by shrapnel, said the governor's spokesman Attaullah Khogyani. He blamed the Taliban.
In Kapisa, also in the east, Gov. Abdul Saboor Wafa's office said eight insurgents were killed Saturday night in an army counter-insurgency operation.
This has also been a deadly year for Afghanistan's security forces — army, paramilitary and police — with around 5,000 deaths recorded so far. Most of those deaths, or around 3,200, have been police officers, according to Karl Ake Roghe, the outgoing head of EUPOL, the European Union Police Mission in Afghanistan, which funds and trains a police force of 157,000.
Associated Press writers Amir Shah in Kabul and Josh Lederman in Honolulu, Hawaii contributed to this story.