Tony Blair, in a 2,700 word article on the threat of "radical Islam", called the decision to withdraw troops "tragic, dangerous, unnecessary" and that the move had "every Jihadist group round the world cheering".
He said the exit was not in the West or Afghanistan's interest as he lamented the likely reversal of gains made during the occupation, with the Taliban reasserting itself across most of the country in recent days.
The former Downing Street incumbent issued a stark warning to Boris Johnson that the manner of the US's handling of the exit indicated that the UK could be relegated from the top division of international powers, with reports that Britain was largely kept in the dark about when American armed forces would leave.
"For Britain, out of Europe and suffering the end of the Afghanistan mission by our greatest ally with little or no consultation, we have serious reflection to do," said Mr Blair.
Man killed in late night crash on A6 Chorley Road near Blackrod
Driving ban for 27 months for Wigan woman caught three times over the limit
Wigan woman who assaulted three people on one day receives community order
Wigan's week in court
Wigan carer who stole thousands of pounds from three vulnerable people is jailed
"We don't see it yet, but we are at risk of relegation to the second division of global powers."
His comments come as US President Joe Biden signalled he wanted evacuations from Kabul airport completed by the end of the month as he prepares to withdraw all American troops - a move that would likely force Britain to wrap up its operation at the same time.
But Mr Blair urged for there to be "no repetition of arbitrary deadlines" - a reference to Washington's Doha agreement with the Taliban, committing to vacate Afghanistan in time for the 9/11 anniversary - in the rescue mission.
"We must evacuate and give sanctuary to those to whom we have responsibility - those Afghans who helped us and stood by us and have a right to demand we stand by them," said the former Labour Party leader
"There must be no repetition of arbitrary deadlines.
"We have a moral obligation to keep at it until all those who need to be are evacuated.
"And we should do so not grudgingly but out of a deep sense of humanity and responsibility."
Mr Blair defended his own decision making in 2001 when he worked with former US president George Bush and Nato allies to avenge the New York World Trade Centre attack.
After the Taliban refused to evict al Qaida, the terror group that masterminded the hijacking of the planes in 2001, Mr Blair said Western allies, who feared worse attacks were to come, felt there was "no safer alternative" than to strike.
He continued: "There is no doubt that in the years that followed we made mistakes, some serious.
"But the reaction to our mistakes have been unfortunately further mistakes.
"Today we are in a mood which seems to regard the bringing of democracy as a utopian delusion and intervention virtually of any sort as a fool's errand.
"The world is now uncertain of where the West stands because it is so obvious that the decision to withdraw from Afghanistan in this way was driven not by grand strategy but by politics.
"We didn't need to do it. We chose to do it.
"We did it in obedience to an imbecilic political slogan about ending 'the forever wars', as if our engagement in 2021 was remotely comparable to our commitment 20 or even 10 years ago, in circumstances in which troop numbers had declined to a minimum and no allied soldier had lost their life in combat for 18 months."
The former Middle East envoy said that, although "imperfect", the "real gains over the past 20 years" were likely to be lost following the Taliban victory, including advances in living standards, education particularly of girls, and other freedoms.
He called for the UK, in its role as president of the G7 this year, to help coordinate an international response to "hold the new regime to account".
The UK Government has been working diplomatically to ensure there is no unilateral recognition of a Taliban government in Afghanistan, with Foreign Secretary Dominic Raab refusing to rule out applying sanctions if the militants renege on their promise to be more inclusive, especially in their attitudes towards women, than when last in control.
Mr Blair said: "We need to draw up a list of incentives, sanctions, actions we can take including to protect the civilian population so the Taliban understand their actions will have consequences.
"This is urgent. The disarray of the past weeks needs to be replaced by something resembling coherence and with a plan that is credible and realistic."