US President Donald Trump has renewed his pledge to bring back US troops from Afghanistan as his administration aims to end the United States's longest war.

"We are working to finally end America's longest war and bring our troops back home," Trump said on Tuesday during his State of the Union address to US Congress that touched on few foreign-policy points.

"I am not looking to kill hundreds of thousands of people in Afghanistan, many of them totally innocent," Trump told the joint session of Congress.

"It is also not our function to serve other nations as a law enforcement agency. These are war-fighters, the best in the world, and they either want to fight to win or not fight at all," he said.

The US president offered his blessing for continuing negotiations with the Taliban armed group, which has been fighting the US-led NATO troops and the Afghan forces since 2001 when the Afghan group was deposed from power.

The talks between the two sides have failed to make headway in recent weeks, with Washington insisting on reduction in violence as a condition to reach a deal.

Taliban accuses US of delaying talks

On Tuesday, the Taliban accused the US of hampering the peace negotiations after US Secretary of State Mike Pompeo said "demonstrable evidence" of a reduction in violence was necessary, Reuters News Agency reported.

"Mr Pompeo should not shift the blame. Our stance is principled and united, and our policy is not shaky like the opposite side," Taliban spokesman Zabihullah Mujahid said in a statement on messaging service WhatsApp.

Trump has long questioned the wisdom of keeping troops overseas and has described the war in Afghanistan launched after the September 11, 2001 attacks as a drain on blood and treasure.

But last year he abruptly said he had cancelled a previously unannounced summit at the Camp David presidential retreat with the Taliban because of an attack that killed an American soldier.

He later allowed veteran US negotiator Zalmay Khalilzad to resume the talks, which had taken place for months in Qatar.

Under a draft deal, the US will withdraw troops, and the Taliban will promise not to allow armed groups to use Afghanistan as a base as well as to open talks with the West-backed government in Kabul.

Little on foreign policy

The Taliban has more recently proposed a limited reduction in violence, an easing of position after previously refusing any halt to attacks it sees as leverage.

Trump's speech focused little on foreign policy, with no mention of North Korea, a year after Trump used the State of the Union to announce his second summit with the nuclear-armed state's leader, Kim Jong Un.

The US leader only briefly mentioned his plan for the Middle East, which he unveiled last week next to Prime Minister Benjamin Netanyahu after more than a year of delay.

On Iran, Trump highlighted his pressure campaign against Tehran and boasted of the controversial strike he ordered last month that killed Iran's top general, Qassem Soleimani.

"Because of our powerful sanctions, the Iranian economy is doing very poorly," Trump said.

"We can help them make it very good in a short period of time, but perhaps they are too proud or too foolish to ask for that help."

Trump in 2018 withdrew from an internationally-backed nuclear deal negotiated under his predecessor, Barack Obama, and imposed sweeping sanctions aimed at reducing Iran's regional clout.