President Donald Trump has vowed to bring U.S. troops home from Afghanistan but he did not provide a timeline for the withdrawal.

“In Afghanistan, the determination and valor of our warfighters has allowed us to make tremendous progress, and peace talks are underway,” the president said during Tuesday's State of the Union speech. “I am not looking to kill hundreds of thousands of people in Afghanistan, many of them totally innocent. It is also not our function to serve other nations as law enforcement agencies.”

“These are warfighters, the best in the world, and they either want to fight to win or not fight at all,” Trump continued. “We are working to finally end America's longest war and bring our troops back home!”

It was not clear whether the president's comments indicate that U.S. Special Representative for Afghanistan Ambassador Zalmay Khalilzad is close to securing an agreement with the Taliban that would include withdrawing all U.S. troops from Afghanistan.

In September the president suspended peace negotiations with the Taliban after the group claimed credit for an attack that killed Army Sgt. 1st Class Elis A. Barreto Ortiz, of the 3rd Brigade Combat Team, 82nd Airborne Division.

Since then, the Taliban has offered a vague promise to reduce violence in Afghanistan as part of a peace agreement. U.S. negotiators have stressed that the Taliban must eventually abide by a ceasefire. The Afghan government has been excluded from the peace negotiations.

Army Gen. Mark Milley, chairman of the Joint Chiefs of Staff, has described the military situation in Afghanistan as a “strategic stalemate,” in which the Taliban cannot overthrow the Afghan government as long as U.S. troops and allied remain in the country.

Milley has deployed to Afghanistan several times. In 2013, he said that Afghan troops and police had been “very, very effective in combat against the insurgents every single day.”

Yet the Washington Post revealed in December that top U.S. government officials have privately admitted that the war was going badly.

Now retired Army Lt. Gen. Michael Flynn told the Office of the Special Inspector General for Afghanistan in 2015, “If we are doing such a great job, why does it feel like we are losing?”

The president's latest comments about Afghanistan are consistent with his repeated promises to end the U.S. military's comment to the Middle East and Southwest Asia, he has not yet withdrawn all U.S. troops from Afghanistan, Iraq, or Syria.

Indeed, the president has changed course several times in Syria. He announced in December 2018 that he would withdraw all U.S. troops from the country – prompting then-Defense Secretary James Mattis to resign in protest – but then he reversed himself.

And in October it appeared that most U.S. troops would leave Syria after Turkey's invasion, but the president agreed to leave a smaller U.S. force in the country to protect oilfields.