KABUL, Afghanistan -- The U.S. and NATO have ceremonially ended their combat mission in Afghanistan, 13 years after the Sept. 11 terror attacks sparked their invasion of the country to topple the Taliban-led government.

NATO's International Security Assistance Force Joint Command, which was in charge of combat operations, lowered its flag Monday, formally ending its deployment.

U.S. Gen. John F. Campbell, commander of NATO and U.S. forces, says the mission is transitioning to a training and support role. He says from Jan. 1, the coalition will maintain a force of 13,000 troops in Afghanistan, down from a peak around 140,000 in 2011.

Get Breaking News Delivered to Your Inbox

The mission ends as the Taliban is increasing its attacks. President Obama recently allowed U.S. forces to launch operations against both Taliban and al Qaeda militants amid the training mission.

And an augmentation of the U.S. role in that training mission was announced just days before Monday's ceremony, with Defense Secretary Chuck Hagel saying about 1,000 more American troops than initially planned were to remain in Afghanistan beyond the end of the year.

At a news conference with President Ashraf Ghani, Hagel said the original plan to cut U.S. troop levels to 9,800 by the end of 2014 had been abandoned, but not because of the recent surge in Taliban attacks.

Hagel said the U.S. will keep up to 10,800 troops for the first few months of 2015 and then restart the drawdown, which is scheduled to reach 5,500 troops by the end of next year.

The U.S. decided to keep additional forces in the country temporarily because planned troop commitments by U.S. allies for a NATO train-and-assist mission starting in January have been slow to materialize.

Gen. John Campbell, the top U.S. commander in Afghanistan, told reporters in an interview later Saturday that he is confident NATO members will furnish the necessary number of troops for the new training mission, which begins Jan. 1. It's just going to take a few extra weeks or months to get them in Afghanistan, he said.

Campbell, who took over on Aug. 26 and has served two previous tours in Afghanistan, spoke glowingly of the new government led by Ghani and Chief Executive Abdullah Abdullah.

"It's like night and day difference dealing with this government," compared with the previous government led by Hamid Karzai, who was often publicly critical of U.S. military efforts against the Taliban insurgency, Campbell said.