The US will slash troop levels in Afghanistan and Iraq to their lowest in nearly 20 years, the Pentagon said on Tuesday, prompting security worries among allies and fear on Kabul's streets after President Donald Trump pledged to end conflicts abroad.

Rejecting concerns that precipitous drawdowns could give up security gains after years of fighting, Acting Defense Secretary Chris Miller said around 2,000 troops would be pulled from Afghanistan by January 15.

Five hundred more would return from Iraq by the same date, leaving 2,500 in each country.

Trump had made ending overseas wars one of his key promises and US forces in Afghanistan had already been reduced from about 13,000 following a deal with the Taliban in February to open peace talks with the Kabul government in return for US troops withdrawing by May 2021.

The troop announcement came just weeks before Trump is scheduled to cede the White House in the wake of his November 3 reelection loss to Democrat Joe Biden.

The moves reflect Trump's policy "to bring the wars in Afghanistan and Iraq to a successful and responsible conclusion and to bring our brave service members home," Miller said.

The US will cut its troop levels in Iraq and Afghanistan
The US will cut its troop levels in Iraq and Afghanistan AFP / Ali YOUSSEF

Miller said the US had met its goals, set in 2001 after the Al-Qaeda attacks on the United States, to defeat Islamist extremists and to help "local partners and allies to take the lead in the fight."

"With the blessings of providence in the coming year, we will finish this generational war and bring our men and women home," he said.

Taliban spokesman Zabihullah Mujahid told AFP that the withdrawal "is a good step and in the interest of the people of both" the US and Afghanistan.

The moves took the United States closer to disengaging from conflicts that have blazed and smouldered through three presidencies with no end in sight since 2001.

US troop deployment and death toll in Afghanistan since 2001. Updated February 14, 2020.
US troop deployment and death toll in Afghanistan since 2001. Updated February 14, 2020. AFP / Laurence CHU

But critics said they risk appearing like a humiliating defeat, leaving the original threat of Islamic extremist attacks intact.

After criticism that Trump was acting abruptly since his defeat, White House National Security Advisor Robert O'Brien said the troop cuts have been in the works for some time.

Trump had promised in 2016 to "put a stop to America's endless wars," he said.

"Today it was just announced at the Pentagon that President Trump is keeping that promise.

"By May it is President Trump's hope that they will come home safely and in their entirety."

Some Kabul residents feared that increased violence would follow any US drawdown.

"The withdrawal of foreign troops will cause the Taliban to escalate their violence," Fatima Safari told AFP.

Rockets have targetted the US embassy compound and housing in Iraq
Rockets have targetted the US embassy compound and housing in Iraq AFP / AHMAD AL-RUBAYE

"It will also cause women to suffer more and make them unable to play their roles".

Bookseller Mahdi Mosawi predicted that "the Taliban will escalate their violence in a bid to seize more political power" once American troops are gone.

The announcement comes 10 days after Trump fired defense secretary Mark Esper, who had insisted on keeping 4,500 troops in Afghanistan to support Afghan security forces.

Until Esper's removal, the Pentagon had argued that the Taliban had not met pledges to reduce violent attacks, which have surged across the country in recent months.

President Ashraf Ghani's spokesman Sediq Sediqqi confirmed in a tweet that Ghani and Miller had spoken on the phone about "continued meaningful US military support to the Afghan Security and Defence Forces".

In Iraq, Trump has also pulled back US forces after dozens of rocket attacks by Iran-allied groups on the US embassy and bases housing American troops.

On Tuesday, a volley of rockets slammed into Baghdad's Green Zone, where the US embassy sits, breaking a month-long truce on attacks against the US compound.

Speaking on condition of anonymity, a senior US defense official dismissed concerns over the risk of resurgences by Al Qaeda and the Islamic State.

"The professionals in the military service have agreed that this is the right move," the official said. "Al Qaeda has been in Afghanistan for decades and the reality is, we'd be fools to say they are going to leave tomorrow."

But allies and senior US politicians saw US troop cuts as dangerous.

On Monday US Senate Majority Leader Mitch McConnell warned of a repeat of the "humiliating American departure from Vietnam" in 1975 -- and a propaganda victory for Islamic extremists.

NATO chief Jens Stoltenberg warned Tuesday that Afghanistan could return to being "a platform for international terrorists to plan and organise attacks on our homelands."

And German Foreign Minister Heiko Maas said Berlin is "concerned over what the US announcement could mean for the continuation of peace talks", warning against a "hasty withdrawal".

Democratic Senator Jack Reed, who sits on the Senate Armed Services Committee, accused Trump of a "cynical, chaotic approach" designed to burnish his own legacy while leaving a mess to successor Biden.

But another senior Democrat, House Armed Services Committee Chairman Adam Smith, said that after speaking with Miller, he saw the move as "the right policy decision."