President Donald Trump, accompanied by Treasury Secretary Steven Mnuchin, speaks to the media in the lobby of Trump Tower in New York. Picture: Pablo Martinez Monsivais/AP

Washington - President Donald Trump opened the door on Monday night to an increase in US troops in Afghanistan as part of a retooled strategy for the region, overcoming his own doubts about America's longest war and vowing "a fight to win."

Trump, in a prime-time televised address at a military base near Washington, said his new approach was aimed at preventing Afghanistan from becoming a safe haven for Islamist militants bent on attacking the United States.

The Republican president, who has repeatedly criticized the Afghanistan strategies of his predecessors, now inherits the same challenges, including a resurgent Taliban and a weak government in Kabul. He is laying the groundwork for greater US involvement without a clear end in sight or providing specific benchmarks for success.

In a speech with few details, Trump did not specify how many more troops would be added, gave no timeline for ending the US presence in Afghanistan, and put pressure on Pakistan, India and NATO allies to step up their own commitment.

But officials said he had signed off on Defense Secretary James Mattis' plans to send about 4 000 more to add to the 8 400 now deployed in Afghanistan.

He warned US support was not open-ended - "our support is not a blank check" - and insisted he would not engage in "nation-building," a practice he has accused his predecessors of doing at huge cost.

"We are not nation-building. We are killing terrorists," he said.

Trump laid out a tougher approach to US policy toward Pakistan. Senior US 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 harbor terrorists."

A Pakistani army spokesman said on Monday that Pakistan had taken action against all Islamist militants including the Haqqani network, which is allied to Afghan Taliban insurgents.

"There are no terrorist hideouts in Pakistan. We have operated against all terrorists, including (the) Haqqani network," spokesman Major General Asif Ghafoor told a media briefing in Islamabad.

Trump expanded the US military's authority for American armed forces to target militant and criminal networks. 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."

"Our troops will fight to win," he added.

A US-led coalition invaded Afghanistan and overthrew the Islamist Taliban government for harboring al Qaeda militants who plotted the Sept. 11 attacks. But US forces have remained bogged down there through the presidencies of Republican George W. Bush, Democrat Barack Obama and now Trump. About 2 400 US forces have died in Afghanistan since the invasion.

PAST SKEPTICISM

The speech came after a months-long review of US policy in which Trump frequently tangled with his top advisers on the future of U.S. involvement in Afghanistan, where Taliban insurgents have been making territorial gains.

US military and intelligence officials are concerned that a Taliban victory over Afghan President Ashraf Ghani's government would allow al Qaeda and Islamic State’s regional affiliate to establish bases in Afghanistan from which to plot attacks against the United States and its allies.

"The unfortunate truth is that this strategy is long overdue and in the interim the Taliban has made dangerous inroads," said senior Republican Senator John McCain, chairman of the Senate Armed Services Committee.

The Republican president overcame his own skepticism about the war that began in October 2001 after the Sept. 11 attacks on the United States. He said repeatedly on the campaign trail last year that the war was too costly in lives and money.

"My original instinct was to pull out," he said in his speech, but added he was convinced by his national security advisers to strengthen the U.S. ability to prevent the Taliban from ousting the U.S.-backed government in Kabul.

Trump's speech came as the president tries to rebound after he was engulfed in controversy for saying both sides were to blame for violence between white supremacists and counter-protesters in Charlottesville, Virginia, earlier this month.

In an allusion to the Charlottesville uproar, Trump said: "We cannot remain a force for peace in the world if we are not at peace with each other."

Trump also said the United States wanted India to help more with Afghanistan, especially in the areas of economic assistance and development.

He 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.

Trump said it could be possible to have a political settlement with elements of the Taliban.

"But nobody knows if or when that will ever happen," he said.

US commanders have long planned for a possible shift in resources from Iraq to Afghanistan as the fight against Islamic State comes off its peak, following gains made in the Iraqi city of Mosul and other areas.

One reason the White House decision took so long, two officials who participated in the discussions said on Sunday, is that it was difficult to get Trump to accept the need for a broader regional strategy that included U.S. policy toward Pakistan.

Trump received a wide range of conflicting options, the officials said.

White House national security adviser H.R. McMaster and other advisers favored accepting a request for an 4,000 additional U.S. forces.

But recently ousted White House strategic adviser Steve Bannon had argued for the withdrawal of all U.S. forces, saying the war was still not winnable, U.S. officials said. Bannon was fired on Friday by Trump.