The Taliban warned the United States on Thursday it would face the same fate as the Soviet Union in the 1980s if it did not leave Afghanistan, as Washington considers slashing troop numbers.
In a taunting message sent on the 39th anniversary of the Soviet invasion of the war-torn country, the Taliban said US forces faced "humiliation" and could "learn a great deal" from the experience of their Cold War foe.
The Soviets pulled out of Afghanistan in 1989, ending a decade-long occupation and precipitating a bloody civil war and the emergence of the Taliban.
"Take heed from the Soviet defeat in Afghanistan and abandon thoughts of testing the mettle of the already proven Afghans," Taliban spokesman Zabiullah Mujahid said in a statement in English, Dari and Pashto.
Mujahid said any future relations between the Taliban and the United States should be based on "sound diplomatic and economic principles" rather than conflict.
The Taliban have not formally responded to the news that Trump had decided to withdraw roughly half of the 14,000 US troops in Afghanistan.
But a senior commander told AFP that the group was "more than happy". The Taliban have long insisted on the withdrawal of foreign troops as a condition for engaging in peace talks.
The White House has so far not confirmed the widely-publicised move that left foreign diplomats and Afghan officials in Kabul stunned and dismayed.
It came last week as US peace envoy Zalmay Khalilzad met with the Taliban in Abu Dhabi, part of efforts to bring the militants to the negotiating table with Kabul.
That was the latest in a series of meetings between US officials and representatives of the Talian that began in the summer.
There are fears Trump's decision could undermine Khalilzad's negotiating position, embolden the Taliban, and further erode morale among Afghan forces, which are suffering record losses.