Donald Trump vowed to maintain America's military commitment in Afghanistan, sustaining America's longest war and reversing his previously staunch resistance to the US engagement there.

In his first first nationally-televised prime-time address since January, the President laid out a vision short on concrete details, but strong on rhetoric - saying that US troops "will fight to win" in Afghanistan, as well as putting pressure on Pakistan to crack down on terrorist sanctuaries near its borders and calling for further help from India.

While multiple reports earlier in the day that Mr Trump was ready to commit as many as 4,000 more troops to the country, the President pointedly declined to state specific details about troop totals. But he made it clear that he planned to keep troops in Afghanistan as a bulwark against violence, even as he said "the American people are weary of war without victory".

"Terror groups will stop at nothing to commit the mass murder of innocent men, women and children," Mr Trump said.

Saying America’s “strategy will change dramatically” in Afghanistan, Mr Trump vowed to delegate more authority to military commanders, saying “micromanagement from Washington, DC does not win battles.” He also sought to define the limits of America’s involvement approach, saying its future in Afghanistan would shift to a “time-based approach to one based on conditions”.

“Conditions on the ground, not arbitrary timetables, will guide our strategy from now on”, Mr Trump said, before underscoring his wariness of a prolonged intervention.

“We are not nation building again,” Mr Trump said, invoking a term he has consistently rejected as a basis for American foreign policy. “We are killing terrorists”.

The controversial orders Donald Trump has already issued Show all 9 1 /9 The controversial orders Donald Trump has already issued The controversial orders Donald Trump has already issued Trump and the media White House Press Secretary Sean Spicer takes questions during the daily press briefing Getty Images The controversial orders Donald Trump has already issued Trump and the Trans-Pacific Partnership Union leaders applaud US President Donald Trump for signing an executive order withdrawing the US from the Trans-Pacific Partnership negotiations during a meeting in the Roosevelt Room of the White House in Washington DC. Mr Trump issued a presidential memorandum in January announcing that the US would withdraw from the trade deal Getty The controversial orders Donald Trump has already issued Trump and the Mexico wall A US Border Patrol vehicle sits waiting for illegal immigrants at a fence opening near the US-Mexico border near McAllen, Texas. The number of incoming immigrants has surged ahead of the upcoming Presidential inauguration of Donald Trump, who has pledged to build a wall along the US-Mexico border. A signature campaign promise, Mr Trump outlined his intention to build a border wall on the US-Mexico border days after taking office Getty Images The controversial orders Donald Trump has already issued Trump and abortion US President Donald Trump signs an executive order as Chief of Staff Reince Priebus looks on in the Oval Office of the White House. Mr Trump reinstated a ban on American financial aide being granted to non-governmental organizations that provide abortion counseling, provide abortion referrals, or advocate for abortion access outside of the United States Getty Images The controversial orders Donald Trump has already issued Trump and the Dakota Access pipeline Opponents of the Keystone XL and Dakota Access pipelines hold a rally as they protest US President Donald Trump's executive orders advancing their construction, at Columbus Circle in New York. US President Donald Trump signed executive orders reviving the construction of two controversial oil pipelines, but said the projects would be subject to renegotiation Getty Images The controversial orders Donald Trump has already issued Trump and 'Obamacare' Nancy Pelosi who is the minority leader of the House of Representatives speaks beside House Democrats at an event to protect the Affordable Care Act in Los Angeles, California. US President Donald Trump's effort to make good on his campaign promise to repeal and replace the healthcare law failed when Republicans failed to get enough votes. Mr Trump has promised to revisit the matter Getty Images The controversial orders Donald Trump has already issued Donald Trump and 'sanctuary cities' US President Donald Trump signed an executive order in January threatening to pull funding for so-called "sanctuary cities" if they do not comply with federal immigration law AP The controversial orders Donald Trump has already issued Trump and the travel ban US President Donald Trump has attempted twice to restrict travel into the United States from several predominantly Muslim countries. The first attempt, in February, was met with swift opposition from protesters who flocked to airports around the country. That travel ban was later blocked by the Ninth Circuit Court of Appeals. The second ban was blocked by a federal judge a day before it was scheduled to be implemented in mid-March SANDY HUFFAKER/AFP/Getty Images The controversial orders Donald Trump has already issued Trump and climate change US President Donald Trump sought to dismantle several of his predecessor's actions on climate change in March. His order instructed the Environmental Protection Agency to reevaluate the Clean Power Plan, which would cap power plant emissions Shannon Stapleton/Reuters

Before he entered the political arena Mr Trump frequently blasted the conflict as a lost cause and a drain on America, and he has built his foreign policy on resistance to overextending American forces abroad. But in past weeks military officials have warned that the deteriorating security situation in Afghanistan imperils American gains, setting off a debate within the administration over how to proceed.

Mr Trump referenced that hesitation in his speech, saying “my original instinct was to pull out” but that he was dissuaded by the risk of terrorist groups rushing into a security vacuum, saying Afghanistan and Pakistan have “the highest concentration” of terror groups of “any region of the world.”

"We cannot repeat in Afghanistan the mistake our leaders made in Iraq," Mr Trump said, referencing the rise of Isis after the departure of American troops from that country.

The decision also hinted at the dynamics of a White House without Steve Bannon. The former top strategist, who departed last week, was a leading non-interventionist voice opposing an Afghanistan escalation.

Some in the Trump administration, such as Vice President Mike Pence and Defence Secretary James Mattis have pushed for an escalation in troops and a push to put more diplomatic pressure on regional powers such as Pakistan and India.

Mr Trump laid out a tougher approach to US policy toward Pakistan and senior U.S. officials warned he could reduce security assistance for Pakistan unless the nuclear-armed nation cooperates more in preventing militants from using safe havens on its soil.

“We can no longer be silent about Pakistan's safe havens,” Trump said. “Pakistan has much to gain from partnering with our effort in Afghanistan. It has much to lose by continuing to harbour terrorists.”

US drops 'Mother Of All Bombs' on Islamic State cave system in Afghanistan

Mr Trump also said the United States wanted India to help more with Afghanistan, especially in the areas of economic assistance and development. He also made clear his patience had limits in support of the Afghanistan government, saying Kabul needed to increase its cooperation in order to justify a continued American commitment. Secretary of State Rex Tillerson said that the US stands ready to support peace talks between the Afghan government and the Taliban "without pre-conditions" and that India would become an "important partner" in ensuring regional stability.

The seemingly staunch shift from Pakistan to India within Mr Trump's speech could test an already strained relationship with Pakistan, with its ally status being called into question a number of times in recent years. Diplomacy could also be difficult, with Mr Trump's administration still without key officials in their embassy in Kabul, the Afghan capital and and with Washington having scrapped the office of the special representative for Afghanistan and Pakistan.

Afghanistan scarcely figured in Mr Trump's 2016 presidential campaign. Without specifically articulating a vision for America’s role in the war-convulsed country, Mr Trump’s foreign policy emphasised scaling back involvement in conflicts abroad and curbing the spread of Islamic extremism. His first major speech on the subject rejected “nation-building”, and in accepting the Republican nomination he warned that “the situation [in the Middle East] is worse than it has ever been before” despite years of costly American intervention.

“We don't want to have a depleted military, because we're all over the place fighting in areas that just we shouldn't be fighting in,” Mr Trump said in a December speech after winning the election. “We have spent, at last count, $6 trillion in the Middle East, and our roads have potholes all over. Our highways are falling apart. Our bridges are falling.”

But Mr Trump and his advisers have said in recent weeks that the turbulent situation in Afghanistan requires a response. Mr Mattis flatly told Congress in June “we are not winning in Afghanistan,” echoing the concerns of military officials who had told legislators they needed more troops, and Mr Trump told reporters earlier this month that “I took over a mess and we’re going to make it a lot less messy.”

In the years leading up to his presidential run, Mr Trump frequently assailed America’s presence in Afghanistan for squandering lives and money. He repeatedly said on Twitter that America should “get out” of Afghanistan, writing in early 2013 that the departure should happen “immediately.”

Once he became a contender for the 2016 nomination, Mr Trump moderated that stance. While he called the decision to invade Afghanistan “a terrible mistake” in 2015 - a criticism he disavowed late that month - he supported keeping troops in Afghanistan to prevent a “collapse”.

“I think it's important, number one, that we keep a presence there and ideally a presence of pretty much what they're talking about - 5,000 soldiers,” Mr Trump said at the time. During his national address he said that U.S. enemies in Afghanistan “need to know they have nowhere to hide - that no place is beyond the reach of American arms.”