The 13-year-long war in Afghanistan officially came to an end yesterday with a flag-lowering ceremony in Kabul, the Associated Press reported.

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.”

Commander of the ISAF, US General John Campbell remembered the more than 3,000 international soldiers killed during the war and said he was confident that Afghanistan’s army was capable of handling the fight alone.

“Resolute Support will serve as the bedrock of an enduring partnership” between NATO and Afghanistan, Campbell said at the ceremony. “The road before us remains challenging, but we will triumph.”

In a statement, President Obama expressed gratitude to the soldiers involved in the more-than-a-decade-long operation.

“Thanks to the extraordinary sacrifices of our men in women in uniform, our combat mission in Afghanistan is ending, and the longest war in American history is coming to a responsible conclusion,” said Obama.

The war, which began as a response to stop the Taliban and al-Qaeda after 9/11, involved as many as 140,000 American troops at one time, the AP reported. The US spent more than $100 million on reconstruction in Afghanistan, on top of the $1 trillion spent on the war.

Taliban spokesman Zabihullah Mujahid said Sunday’s events were a “defeat ceremony,” and said they would not be giving up.

“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,” Mujahid said.

While the war is over, at least formally, nearly 11,000 of the 13,500 members of the “residual force” will still be American. Afghan’s national security adviser Mohammad Hanif Atmar told those at the ceremony that international military support is still greatly important.

“We need your help to build the systems necessary to ensure the long-term sustainability of the critical capabilities of our forces,” he said to the ISAF leaders.