The West must maintain some "boots on the ground" military presence to combat Islamist extremism and prevent terrorist attacks emerging from other countries, Tony Blair has said.
The former UK prime minister said counter-terrorism measures would not be enough to tackle the "entrenched problem" of extremism.
Mr Blair, who sent British troops into Afghanistan after 9/11 and has criticised the Nato withdrawal from the country, defended the West's efforts to rebuild the nation after the invasion.
He said in a speech to mark this week's 9/11 anniversary that the West could help other potential trouble spots, for example in Africa, to help tackle poverty and security challenges.
"We could adopt a strategy of assisting countries with security but also supporting the governments’ own attempts to develop their nations," Mr Blair said.
"We need some boots on the ground. Naturally our preference is for the boots to be local. But that will not always be possible."
Mr Blair highlighted a report published last week by his Institute for Global Change which examined the roots of Islamism stretching back decades.
The report by Emman El-Badawy, a researcher on extremism, said efforts were needed to tackle the social and political appeal of Islamism rather than just its violent effects.
"Violence and terrorism should be understood as the tactics or means to achieve a goal rather than the ultimate objective," it said.
"[Islamists] do this because the ultimate project remains one of state-building and social justice on their own terms."
US President Joe Biden has said that American forces will carry out counter-terrorism operations from outside Afghanistan if necessary, but Mr Blair said this would not be enough.
Mr Blair said that aversion to military losses had become an "overwhelming political constraint" to sending Nato troops abroad. Britain suffered 457 military deaths in Afghanistan.
He suggested this could encourage extremists to kill as many Nato soldiers as possible in order to weaken political support for a conflict.
"If the enemy we're fighting knows that the more casualties they inflict, the more our political will to fight erodes, then the incentive structure is plain," he said.
"They hold territory, they build capacity, and the one thing that is very clear is that they're prepared to take large numbers of casualties.
"For sure, we could have remade better, but Afghans did not choose the Taliban takeover. The barrier to nation-building is usually not the people, but poor institutional capacity and governance."
Western countries hope to persuade the Taliban to combat terrorism, offering the prospect of unfrozen funds and increased international engagement in return.
The Taliban victory has led to concerns that terrorists will once again use the country as a base. Al Qaeda used it as a safe haven to plan the 9/11 attacks.
Mr Blair said Britain should be part of Europe's efforts to build an independent military capability that is not reliant on Washington.
The US withdrawal effectively tied the hands of its Nato allies, spurring calls for Europe to create its own rapid reaction force. These have been led by the EU, of which Britain is no longer a member.
"Europe faces the immediate challenge from the destabilisation of the Sahel," Mr Blair said. "Europe is already facing the fallout from Libya, Syria and elsewhere in the Middle East. And for these purposes Britain is part of Europe, like it or not."