War in Afghanistan ends Sunday, finally marking the formal end to the longest war in American history to date. However, even though the war in Afghanistan ends, it doesn't mean that the it won't be ending any bloodshed soon.

President Barack Obama marked the formal end Sunday. He said that after 13 years, finally the war in Afghanistan ends, marking a "responsible conclusion" to the longest war in American history, according to NBC News.

As the war in Afghanistan ends, the U.S. president honored the more than 2,200 Americans who have died since combat began 13 years ago. According to Obama, the years of the war had tested the U.S. and its military.

On Oct. 7, 2001, American warplanes began bombing Afghanistan, just less than a month after the 9/11 attacks. The goal then was to drive power away from Taliban after they gave sanctuary to Osama bin Laden and al Qaeda, those who plotted the 9/11 terror. That was Nov. 13, 2001.

Since then, the U.S. and its allies have tried to build Afghan military and police forces to defend their country without the help of outside forces.

However, even as war in Afghanistan ends, the peak of 140,000 troops in 2010 would be trimmed to just 13,500 by the U.S. and Nato, according to The Guardian. This means the U.S. will remain involved in the fight of Afghanistan against the Taliban for the following years.

"In the wake of the Taliban's defeat in 2001, Afghanistan possessed no standing, professional security forces," said Army General John Campbell, chief of the International Security Assistance Force, as the war in Afghanistan ends. "Over the course of a decade, our Afghan partners and we have built a highly capable Afghan army and police force of over 350,000 personnel."

TIME described the Sunday incident as marking the formal handoff to the largely U.S.-trained Afghan military.

"The road before us remains challenging, but we will triumph," Campbell told a small crowd at ISAF headquarters.

As the war in Afghanistan ends, President Obama said in a statement:

"For more than 13 years, ever since nearly 3,000 innocent lives were taken from us on 9/11, our nation has been at war in Afghanistan. Now, 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."

Campbell added that the new, smaller allied mission, will be called Operation Resolute Support.

The Pentagon also addressed the situation back in Washington, saying that the new mission will be called Operation Freedom's Sentinel.

"We will work with our allies and partners as part of NATO's Resolute Support mission to continue training, advising, and assisting Afghan security forces," said outgoing Defense Secretary Chuck Hagel. "And we will continue our counterterrorism mission against the remnants of al Qaeda to ensure that Afghanistan is never again used to stage attacks against our homeland."

The war in Afghanistan ends and many are celebrating if not the end of the bloodshed, at least some of it. A total of 3,485 allied troops reportedly died in Afghanistan over the past 13 years. This includes 2,356 Americans. The war also cost about $1 trillion of contributions of U.S. taxpayers, past, present and future.

"We will never forget your sons and daughters who have died on our soil," Afghan National Security Adviser Mohammad Hanif Atmar said at the flag-lowering ceremony Sunday. "They are now our sons and daughters."