On Sunday, a military ceremony in Kabul marked the official end of the 13-year NATO combat mission in Afghanistan.

Unfortunately the Taliban, whose remarkable resurgence continues to test Afghan forces and terrorize citizens, did not hold a similar event.

Instead, the insurgent group that was mostly defeated in the wake of the initial 2001 invasion is expected to continue its fight against remaining NATO forces as well as the Afghan government.

The Taliban has been emboldened by success in many areas of Afghanistan, and can still often find safe haven across the border in Pakistan. Those dynamics helped make 2014 the deadliest year yet for Afghan security forces, with about 5,000 killed in attacks by the Taliban and other extremist groups.

Fortunately, Afghan security forces, which number about 350,000, will not totally be on their own — NATO will still have a mission to advise, train and assist. But there will be far fewer troops in-country, with the newly named Operation Resolute Support requiring about 12,500 to 13,500 forces. Currently, there are about 11,000 U.S. troops in Afghanistan.

The official end of NATO combat operations will not necessarily mean the end of combat for U.S. forces. In November, President Obama reportedly reversed course from previous proclamations about the U.S. role in Afghanistan and expanded the military mission for U.S. forces by allowing them to carry out combat missions against insurgents, including the Taliban, that threaten U.S. troops or Afghan government interests. The new directive includes a provision allowing U.S. aircraft, including drones, to protect Afghan forces engaged in combat.

The change was pushed by the Pentagon, which assessed the relative readiness of Afghan forces and determined that U.S. help was still needed.

It has also become clear that new Afghan President Ashraf Ghani and Abdullah Abdullah, his political rival who is now Afghan chief executive, need more time to form a cohesive government — a goal that has eluded the two since they signed off on a last-minute power-sharing agreement after a disputed 2014 election.

Many Americans, understandably weary and wary after a 13-year war, will not welcome the United States' continued combat role. But they should consider the example of Iraq, where failure to secure a status-of-forces agreement led to a full U.S. withdrawal.

The subsequent military vacuum — exacerbated by an incompetent, incoherent sectarian government led by then-Prime Minister Nouri al-Maliki — created the conditions that led to the rise of the Islamic State of Iraq and the Levant (ISIL). Now, U.S. forces are back in harm's way advising Iraqi and Kurdish Peshmerga forces on ousting ISIL from broad swaths of the country. The Obama administration should remain flexible and not repeat thismistake in Afghanistan.

While the war, and the U.S. role, is far from over, the transition is a good time to reflect upon the sacrifices U.S. forces and their families have made. More than 2,200 were killed, and nearly 20,000 were wounded. The war has come at a considerable economic cost, too, with estimates as high as about $1 trillion.

Thousands of Minnesotans have served in Afghanistan since the war began just weeks after 9/11. Some were Marines, while others served with the U.S. Army, U.S. Navy or U.S. Air Force. Still others were members of the Minnesota National Guard, which deployed 5,529 citizen soldiers and airmen over the long campaign.

To date, 31 in uniform with Minnesota ties have been killed.

Their service, and sacrifice, is appreciated by a grateful nation and state. And no doubt most Afghans working to build a country and a life free from Taliban terror appreciate Western efforts on their nation's behalf, too.

Now it will be mostly up to those same Afghans to defend their central government and their fellow citizens from extremism. They'll be backed by the remaining NATO troops, which while fewer in number should still be remembered and appreciated at home.