President Obama addressed American troops in Hawaii on Christmas, a week before the U.S. combat mission in Afghanistan ends. (Reuters)

HONOLULU — President Obama marked the end of the U.S. military's combat mission in Afghanistan on Sunday, saying that 13 years after the war began it is coming to a "responsible conclusion" as American forces draw down to a minimal presence in that country.

Obama acknowledged in a written statement that Afghanistan remains "a dangerous place" and that the 10,800 U.S. personnel who will remain mostly in an advisory and training role will continue to face risks.

But in thanking the troops, intelligence officers and diplomatic officials for their service, Obama said that the United States is safer and more secure and that Afghanistan will take the lead in ensuring its own security.

"We honor the profound sacrifices that have made this progress possible," said Obama, who delivered a similar message last week on a Christmas visit to speak with troops at a U.S. Marine base on Oahu, where he is on vacation. "We salute every American — military and civilian, including our dedicated diplomats and development workers — who have served in Afghanistan, many on multiple tours, just as their families have sacrificed at home."

Obama's statement came hours after the United States and NATO held a ceremony in Kabul to mark the end of the combat mission. The president, who took office on a pledge to end the U.S. wars in Afghanistan and Iraq, said he had largely done so, despite authorizing American airstrikes on the Islamic State militant group in Iraq and Syria.

"These past 13 years have tested our nation and our military," he said. "But compared to the nearly 180,000 American troops in Iraq and Afghanistan when I took office, we now have fewer than 15,000 in those countries. Some 90 percent of our troops are home."

Although Kabul has experienced an increase in violence in recent months, Obama emphasized the progress made in fighting terrorists responsible for the Sept. 11, 2001, attacks on the United States, including killing Osama bin Laden and killing and capturing other al-Qaeda leaders.

He also vowed to take care of veterans, promising them "the world-class care and treatment they have earned."

Most of all, Obama said, "we remember the more than 2,200 American patriots who made the ultimate sacrifice in Afghanistan, and we pledge to stand with their Gold Star families, who need the everlasting love and support of a grateful nation."