But Trump provided few specifics about his policy and how much the U.S. military commitment in the region would increase as a result, insisting that conditions on the ground would determine troop levels and strategy.
Trump's decision to further commit to the nation's longest war, rather than withdraw, reflects a significant shift in his approach to Afghanistan since taking office and marks a new willingness to take greater ownership of a protracted conflict that he had long dismissed as a waste of time and resources. As a candidate, Trump denounced Afghanistan as a "total disaster" and railed that the costly conflict in Central Asia drained enormous resources at a time of more pressing needs at home for American taxpayers.
"My original instinct was to pull out, and historically I like to follow my instincts," Trump said in his first prime-time address, delivered from the Fort Myer military base in Arlington, Va. "I heard that decisions are much different when you sit behind the desk of the Oval Office."
Trump's new approach to Afghanistan is the result of a long policy review within his administration that was finalized during a presidential retreat with top advisers at Camp David on Friday.
His decision to endorse a Pentagon plan to boost troop levels reflects mounting concern among military leaders that battlefield setbacks for Afghan government forces against the Taliban and al-Qaeda have led to a rapidly deteriorating security situation.
Although Trump did not specify how many more troops will be sent to Afghanistan, congressional officials said the administration has told them it will be about 4,000 more than the 8,500 U.S. service members currently in the region.
In his speech Monday, Trump laid out a strategy that included pressuring Pakistan to do more to stop terrorists from finding safe haven within its borders. He also said that India would play a greater role in providing economic and developmental support.
Trump acknowledged that his approach is a departure from his campaign rhetoric, but he said he would prioritize American security over attempting to "dictate" to the Afghan people how to live.
He called his approach "principled realism" and portrayed it as in keeping with the "America First" approach of his administration. He pledged that U.S. troops would have a clear definition of victory in Afghanistan, but offered only a broad outline of what that would mean.
"Our troops will fight to win," Trump 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."
Hamdullah Mohib, Afghanistan's ambassador to Washington, said Trump's message was "exactly what we wanted" because it "takes into account our country's needs and constraints. We did not want it to be about troop numbers or time lines, but to conditions on the ground," he said while visiting Kabul. "We welcome this strategy that integrates American military power into achieving our shared goals."
After taking office, Trump announced that he would delegate authority to the Pentagon to set troop levels. That raised fears among some lawmakers and foreign policy analysts that even a modest initial increase could escalate rapidly and plunge the United States more deeply back into a conflict that has resulted in the deaths of 2,403 Americans.
"After the extraordinary sacrifice of blood and treasure, the American people are weary of war without victory," Trump said. "Nowhere is this more evident than with the war in Afghanistan."
Although President Barack Obama did not fulfill his campaign pledge to end the conflict, his administration vastly decreased troop levels from a high of more than 100,000, and shifted remaining forces to a less dangerous training and advisory role.
Vice President Pence and Defense Secretary Jim Mattis have advocated for the Pentagon plan to add troops, along with broader diplomatic and economic pressure on regional players, especially Pakistan.
Pence began briefing members of Congress about the strategy hours before Trump's speech.
Republican leaders praised the strategy and the deliberate nature of Trump's thought process.
"I'm actually pleased with the way he went about making this decision," House Speaker Paul D. Ryan (R-Wis.) said at a town hall meeting televised by CNN that began immediately after Trump's remarks. "We have had a convoluted approach to Afghanistan and I think it's high time we had a comprehensive approach."
Sen. John McCain (R-Ariz.), who has urged Trump to articulate a new strategy for the region, called the speech "long overdue." But he praised Trump for shifting the nation away from the Obama administration's approach.
"I believe the President is now moving us well beyond the prior administration's failed strategy of merely postponing defeat," McCain said in a statement. "It is especially important that the newly announced strategy gives no timeline for withdrawal, rather ensures that any decision to reduce our commitment in the future will be based on conditions on the ground."
Democrats criticized Trump for not offering more specifics in his speech.
"Tonight, the President said he knew what he was getting into and had a plan to go forward. Clearly, he did not," House Minority Leader Nancy Pelosi (D-Calif.) said in a statement. "The President's announcement is low on details but raises serious questions. When President Trump says there will be no ceiling on the number of troops and no timeline for withdrawal, he is declaring an open-ended commitment of American lives with no accountability to the American people."
Trump's task Monday night was magnified by his need to convince his core supporters, many of whom responded to his campaign calls to put "America First" by reducing foreign interventionism in the Middle East and Central Asia. His speech came just days after the departure of chief strategist Stephen K. Bannon, who had advocated for replacing U.S. troops with private security contractors.
In a nod to concerns among his supporters that his decision marks a retrenchment in Afghanistan, Trump insisted that the United States would not provide "unlimited" support and resources.
"Our commitment is not unlimited, and our support is not a blank check," Trump said. "The government of Afghanistan must carry their share of the military, political, and economic burden."
But the strategy Trump described Monday night amounted to an open-ended approach, which is likely to worry voters who supported him, in part, because of his promise to scale back the United States' commitments abroad.
It is not the first time Trump has shifted away from his campaign rhetoric about foreign entanglements in his actions as president.
He has framed his decisions to use military force — including Tomahawk missile strikes on an air base in Syria in April after President Bashar al-Assad used chemical weapons — around his pledge to be tough on terrorism and direct threats to American security. But before serving as president, he criticized Obama for contemplating military action in Syria in response to Assad's chemical weapons use.
Trump has been acutely aware of the limited options he faces and has blamed his predecessors — principally Obama — for leaving him what he described Monday as a "bad and very complex hand."
Citing Obama's decision to withdraw from Iraq in 2011, Trump said he would not consider such a strategy in Afghanistan.
"A hasty withdrawal will create a vacuum that terrorists, including ISIS and al-Qaeda, would instantly fill," he said. "We cannot repeat in Afghanistan the mistake our leaders made in Iraq."
Even before his campaign, Trump was skeptical about the war. "When will we stop wasting our money on rebuilding Afghanistan?" he tweeted in 2011. "We must rebuild our country first."
As a candidate, he argued for a more isolationist approach to foreign policy. Recent foreign wars, he told his supporters, had drained the United States of blood and treasure at the expense of efforts such as education and infrastructure at home.
"So we're on track now to spend, listen to this, $6 trillion — could have rebuilt our country twice — altogether, on wars in Iraq and Afghanistan and the Middle East," Trump said during a speech in Cleveland during the campaign. "Meanwhile, massive portions of our country are in a state of total disrepair."
This argument was a departure from the Republican Party's hawkish stance on military engagement and the two post-Sept. 11 conflicts in Afghanistan and Iraq that began under President George W. Bush. Trump's stance helped him appeal to some Democratic-leaning voters who were skeptical of the wars and perceived Democratic presidential candidate Hillary Clinton as more hawkish than many in her party.
As president, Trump has used bellicose rhetoric to describe his military objectives, even as he has resisted being specific about his plans and objectives. He repeated that pattern in laying out his vision for U.S. engagement in Afghanistan.
"Conditions on the ground, not arbitrary timetables will guide our actions from now on," he said. "I will not say when we are going to attack, but attack we will."
Within the White House, Bannon's opposition to sending more troops to Afghanistan helped fuel strife with other Trump aides, including national security adviser H.R. McMaster, who supported the modest troop surge.
Bannon had advocated for a proposal to replace U.S. troops with private security contractors, an idea floated by Erik Prince, the founder of the controversial contracting firm Blackwater USA and brother of Education Secretary Betsy DeVos. Military leaders largely opposed the idea, and the White House ruled it out.
But foreign policy analysts said Trump's decision on Afghanistan is tricky because his strategy does not represent a radical departure from the past.
"To be honest, it's probably pretty close to what a Hillary Clinton would do," said Derek Chollet, an assistant secretary of defense in the Obama administration who now serves as a defense analyst at the German Marshall Fund.
Pamela Constable, Ed O'Keefe and Adam Entous contributed to this report.