The head of Nato has warned of a "high price" if US and allied forces leave Afghanistan too quickly.
In a statement, Jens Stoltenberg said the country risked once again becoming a platform for international terrorists to organise attacks.
It follows reports by US media that President Donald Trump may speed up troop withdrawals from Afghanistan and Iraq before he is due to leave office.
President Trump has previously said he wants "all" troops home by Christmas.
He has criticised US military interventions for being costly and ineffective.
But Mr Stoltenberg, secretary general of the Nato military alliance, said on Tuesday: "The price for leaving too soon or in an uncoordinated way could be very high."
He specifically warned that the Islamic State group could use Afghanistan to rebuild after losing ground in Syria and Iraq.
He added that there were fewer that 12,000 Nato soldiers in the country, "and more than half of these are non-US forces". Funding for their mission to train and help Afghan security forces had been allocated "through 2024".
What has been said about US troop withdrawals?
On Monday, defence officials told US media than American forces in Afghanistan would be cut from about 5,000 down to 2,500 by mid-January. In Iraq they would be reduced from 3,000 to 2,500 under the plans.
The withdrawal should be finished by 15 January, US media reported, just days before Joe Biden's inauguration as president.
Military leaders were told at the weekend about the planned withdrawals, according to officials quoted by the Associated Press news agency. An executive order is being drawn up but has not yet been sent to commanders, they added.
Afghans dare to hope for peace
Has Trump kept his promises on the military?
In September, the Pentagon announced it was to withdraw more than a third of its troops from Iraq within weeks - from about 5,200 to 3,000.
At the time, top US Middle East commander Gen Kenneth McKenzie said those remaining would continue to advise and assist Iraqi security forces in "rooting out the final remnants" of the jihadist group Islamic State (IS).
Why are US forces deployed in Afghanistan?
US forces have been in Afghanistan since 2001. A US-led coalition ousted the Taliban weeks after the 11 September 2001 attacks in the US by al-Qaeda, which was then based in Afghanistan.
The Taliban regrouped and became an insurgent force that by 2018 was active in more than two-thirds of the country.
The US started withdrawing troops from Afghanistan as part of of a historic peace deal signed by the US and the militants on 29 February.
Military chiefs, including Gen McKenzie, have warned in the past that peace negotiations between the Taliban and Afghan authorities could be undermined by a hasty US withdrawal.