Speaking in Arlington, Virginia, Mr Trump said: “Nearly 16 years after the September 11 attacks…the American people are weary of war without victory and nowhere is this more evident than with the war in Afghanistan.”
He said the US “must seek an honourable and enduring outcome worthy of the sacrifices that have been made” and that the “consequences of a rapid exit are both predictable and unacceptable”.
“A hasty withdrawal would create a vacuum that terrorists…would instantly fill just as happened before September 11,” he said.
But Mr Trump, who was widely expected to announce an increase in 4,000 troops, said he would “not talk about numbers of troops or plans for further military activities”.
Instead of a strategy “based on timelines”, his would be based on “conditions”, he said.
“We are not nation building again – we are killing terrorists.”
At its peak, the US had roughly 100,000 troops in Afghanistan but this number has dropped to roughly 8,400 now, as the country battles a resurgent Taliban.
During his presidential campaign, Mr Trump criticised his country’s involvement in the 16-year war, saying the US should get out.
But he also vowed to win more wars and an exit from Afghanistan now would have been impossible to pass off as a victory.
He told the soldiers in Arlington that he had studied the Afghanistan situation “in great detail” and “from every conceivable angle”, adding that he had been “given a bad and very complex hand” when he became President.
He said that, while the US would continue to support the Afghan Government, it was up to the Afghan people to “take ownership of their future”.
“The stronger the Afghan security forces become, the less we will have to do,” he said.
“We want them to succeed but we will no longer use American military might to try to construct democracies in far off lands.”
He also had a warning for Pakistan, saying: “No partnership can survive a country’s harbouring of militants” and adding that it was “time for Pakistan to demonstrate commitment to civilisation, order and peace”.
“America’s interests are clear – we must stop the re-emergence of safe havens that enable terrorists to threaten America, and we must prevent nuclear weapons and materials from coming into the hands of terrorists.”