President Donald Trump on Monday promised to "change dramatically" the U.S. approach to the long-running war in Afghanistan but was scant on details on what the changes will be.

Speaking at the Fort Myer Army base in Arlington, Virginia, the president acknowledged his past calls for withdrawing entirely from Afghanistan but said that after much consideration he had decided to stay in and "fight to win."

He targeted Afghanistan as well as Pakistan for what he said has been their roles in also harboring terrorists and called on allies and partners to protect shared interests in the Middle East and around the globe.

"In Afghanistan and Pakistan, 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 and being used against us," Trump said.

The president said the U.S. would shift from a "time-based approach" on Afghanistan and South Asia to one based on conditions. The administration will not talk about numbers of troops or plans for further military activities.

"I will not say when we're going to attack, but attack we will," he said.

During the more than 16 years U.S. troops have been in Afghanistan, numbers peaked in 2011 at 100,000. By the end of the Obama administration, the number had fallen 8,400, about where it stands today.

The war in Afghanistan began in the aftermath of the Sept. 11, 2001 terrorist attacks, when the U.S. invaded in an effort to topple the Taliban and eliminate a haven for terrorist group al Qaeda. President Barack Obama in 2014 declared an end to combat operations. It is America's longest war.

"The American people are weary of war without victory," Trump said Monday night.

Trump said he had been dealt a "bad" and "complex" hand when assuming the presidency and criticized past "nation building" efforts in Afghanistan and Iraq. "We are not nation building again, we are killing terrorists," he said. He also said that the United States' commitment would not be a "blank check."

TST Recommends

Drawing on a common theme of his presidency, he called on other nations to pitch in, including India, which he noted does billions of dollars in trade with the U.S. "We want them to help us more," he said.

Trump also seemed to indicate military leaders would be given more leeway in making decisions on the battlefield. "Micromanagement from Washington, D.C. does not win battles," he said.

"I am very comfortable that the strategic process was sufficiently rigorous and did not go in with a pre-set position," Defense Secretary Jim Mattis told reporters on Sunday ahead of Trump's announcement.

Before arriving at the White House, Trump often railed against the war in Afghanistan. He criticized the Obama administration for its decisions there and called for the U.S. to pull out, slamming the effort as a waste of money and military effort.

Trump acknowledged on Monday that his "original instinct" was to pull out.

"Our troops will fight to win," he said. "From now on, victory will have a clear definition: attacking our enemies, obliterating ISIS, crushing al-Qaeda, preventing the Taliban from taking over the country, and stopping mass terror attacks against Americans before they emerge."

Trump's has come under fierce criticism in recent days over his equivocal response to racist violence in Charlottesville, Virginia, and his lukewarm response to calls for him to denounce white supremacists, neo-Nazis and the KKK. On Monday he attempted to calm his critics and called for unity.

In the U.S. there is "no room for prejudice, no place for bigotry and no tolerance for hate," he said. "We cannot remain a force for peace in the world if we are not at peace with each other," he added.

U.S. stock futures and Asia markets were little moved by Trump's speech, during which he stuck to prepared remarks with a measured tone. The president is scheduled to speak at a rally on Tuesday in Arizona.

Trump's speeches may give diplomats and editorial writers jitters, but it's been very good for defense and aerospace stocks. Ahead of Trump's speech on Afghanistan Monday evening, the SPDR S&P Aerospace & Defense ETF (XAR) , had risen 26% since the close on election day. That compares with a 13.5% gain for the S&P 500 index. Read more.

More of What's Trending on TheStreet: