It is often referred to as the day that changed the world, but the repercussions of the 9/11 attacks US were felt far beyond the locations of New York, Washington and Pennsylvania.

It would reverberate for decades, far beyond the US, shaping its foreign policy, and that of its allies, for many years.

This weekend the world will stop to remember the events of that day 20 years ago, when we watched in horror as the US was under attack.

As it became clear that responsibility for the appalling loss of life rested with Osama bin Laden and the al-Qaeda network, Afghanistan became the immediate focus of the US intelligence services.

Smoke pours from the World Trade Center after it was hit by two hijacked passenger planes

Its then-Taliban government harboured Bin Laden and, as such, found itself under attack. Within days, the Taliban found itself swept from power as US and NATO allies made dismantling the al-Qaeda network its priority.

There is a strange synchronicity in the fact that two decades on, Afghanistan is back as a primary focus for the US.

President Joe Biden had wanted all troops withdrawn from the country before the 9/11 anniversary this year, but the chaos and carnage of that withdrawal was not what any US President would want.

Ashley Jackson is author of 'Negotiating Survival: Civilian-Insurgent Relations in Afghanistan' and has written extensively on the conflict in Afghanistan. She says the US has failed to learn many of the lessons it could have from 9/11.

US President Joe Biden and First Lady Jill Biden attend the dignified transfer of the remains of fallen service members at Dover Air Force

"We were so deeply entwined in the future of Afghanistan and propping up this post 2001 government, that even as the problems of corruption, even as the Taliban grew after 2006, it was hard to divorce ourselves from this narrative of this democracy ... how could it possibly fail."

"We saw that illusion crumble" year after year, Ms Jackson said, as the Taliban came back, as elections turned out to be fraudulent, as corruption mounted. But the US continued to maintain a narrative of success, a view that did not help it recognise the kind of problems that would arise when the US withdrawal began.

Read more:
Timeline: Key dates in Afghanistan since 2001
20 years on, families recall memories from 9/11 attacks
Afghan journalists tell of Taliban beatings after covering protests
RTÉ Archives: Breaking News Of 9/11 Attacks

Next week, the US Secretary of State Anthony Blinken will testify to the US Senate Foreign Relations Committee as it examines the issues around the US withdrawal from Afghanistan.

Whatever the lessons to be learned from the events of recent weeks, the US is faced with the unavoidable reality of a Taliban group back in power.

As the US and Western allies seek to get those left behind out of Afghanistan they must form some type of relationship with Afghanistan's new rulers.

Beyond the immediate concern of wanting to extract those left behind, there are the very real longer-term considerations for the West about how it deals with the new reality in Afghanistan.

A boy wearing a headband with the Taliban flag and holding Taliban flags stands next to a Taliban fighter

Ibraheem Bahiss is an Afghanistan expert with International Crisis Group. He said the international community is now in a very difficult situation.

Some countries say they have to deal with the Taliban, regardless of how they came to power. They are likely to remain a dominant political force and "an unstable or neglected Afghanistan is likely to breed more problems than it solves".

Mr Bahiss believes the sentiment is now shared in many Western countries that the isolationist policies employed against the Taliban in the 1990s would be counterproductive is used again.

When it was tried before, he said, it drove the Taliban into the hands of al-Qaeda and emboldened al-Qaeda to take the type of actions they did. So some kind of relationship will have to evolve for counterterrorism reasons.

But there is another concern, and that is the humanitarian issue. Afghanistan is on the brink of major humanitarian crisis.

According to UN Office for the Co-Ordination of Humanitarian Affairs, an estimated 570,000 people were internally displaced by conflict in Afghanistan between January and August of this year.

Afghan women take part in a protest march for their rights under the Taliban rule

At the start of this year, as many as 14 million people did not have access to sufficient food, according to the UN putting more than one third of the population of 38 million people at risk of going hungry.

That food insecurity has been exacerbated by repeated droughts in the country in the last three years.

Added to that is Covid-19, which has had a huge impact in Afghanistan and also the dependency on the West, which has grown in recent years.

Apart from the moral obligation to help avert a disaster, Mr Bahiss argued that if the simmering humanitarian crisis is allowed to explode, it could see even larger numbers of refugees fleeing Afghanistan to find safety elsewhere, potentially in Europe and other parts of the West.

A safer world?

Twenty years on, the question for many in the US is - is the world any safer?

Mr Bahiss pointed out that most of al-Qaeda’s leadership has left Afghanistan, driven out by military pressure from the US.

It is an organisation which has now largely become decentralised, with many of its top leaders killed or captured including, of course, Osama bin Laden.

A passerby takes pictures of newspaper headlines reporting the death of Osama Bin Laden on 2 May, 2011

The fracturing of the organisation has decreased its power although local chapters remain spread across the world.

And other threats emerge and evolve. The recent attack on Kabul airport which killed over 180 people, including 13 US soldiers, was claimed by a group called ISIS-K.

Mr Bahiss said it is a group which emerged in 2015/2016 and modelled itself on the Taliban idea of taking and holding territory.

Over the years, ISIS-K has come under a lot of pressure not just from the Afghan government but also from the Taliban, who have contested it militarily in a number of areas.

Taliban supporters gather to celebrate the US withdrawal of all its troops out of Afghanistan

It has lost some ground, though it does still have sleeper cells in many of Afghanistan’s urban areas. The ability of those cells to cause deadly damage was seen in the Kabul attack.

All of these concerns mean that Afghanistan will be a foreign policy concern for the US for many years to come.

And all these years on, do Americans, made to feel so vulnerable by the attacks of 9/11, feel any more secure?

A flag adorns the 9/11 Memorial on the anniversary of the terrorist attacks at the World Trade Center site

Ms Jackson says there is really no way to know the answer to that.

"Certainly, we've developed a mentality of fear around traveling on airplanes.

"We're all still in this heightened state of alerts and fear and worry about whether or not 911 could be repeated ... the War on Terror for better or worse, continues."

All of that makes it very difficult to answer the question of 'was it worth it?’