Defence Secretary Lloyd Austin and Chairman of the Joint Chiefs of Staff Mark Milley agreed that the extremist organisations could regroup in Afghanistan within two years, or possibly faster, after the US leaves the country by the 20th anniversary of 9/11.
The warning comes on the same day the Democrat-controlled House voted to repeal the 2002 resolution that authorised the invasion of Iraq, seen as a precursor to rolling back the more broad 2001 resolution that had authorised the invasion of Afghanistan.
Mr Austin and Mr Milley gave the warning during a Senate Appropriations Committee hearing on the 2022 Department of Defense budget request. Senator Lindsey Graham asked the pair to rate the likelihood of international terrorist organisation regenerating in Afghanistan and posing a threat to the US and its allies.
“I would assess it as medium. I would also say, Senator, that it would take possibly two years for them to develop that capability," Mr Austin replied.
Mr Milley, a veteran of the Afghanistan war, said he concurred with Mr Austin’s assessment of "medium" likelihood of that happening, as opposed to small or high.
"And I think that if certain other things happen — if there was a collapse of the government or the dissolution of the Afghan security forces — that risk would obviously increase, but right now I would say ‘medium’ and about two years or so,” Mr Milley said.
Joe Biden announced in April that the final withdrawal of US troops from Afghanistan would begin on 1 May, under a deal negotiated between the previous president Donald Trump and the Taliban, to be completed before the 20th anniversary of the September 11 terrorist attack.
Estimates of US troops in the country varied between 2,500 to 3,500 at the time of the announcement, plus about 7,000 Nato troops, which would also withdraw from the country. It will end nearly two decades of war that killed more than 2,200 US troops, wounded 20,000, and cost as much as $1 trillion (£720bn).
The Pentagon has previously indicated the drawdown is about half complete.
In announcing the withdrawal, Mr Biden said the US achieved its goals of killing Osama bin Laden and degrading Al Qaeda in Iraq and Afghanistan, and that white supremacy was now the "most lethal" threat to the US homeland.
Mr Milley said that a 160 per cent increase in illegal crossings at the southern border in the past year also constituted a national security threat for the US from criminals and terrorists, while the "great risk" to future generations would come from China if they don’t combat the communist country’s program achieve military superiority over the US by 2050.
"I think it’s incumbent upon us, the United States, to make sure that we maintain military overmatch, relative to China, in order to maintain peace and deterrence," he said.
"If we fail to do that, it’s my personal and professional opinion that we’re going to place our future generation at great risk."