In the 19th century, the phrase "The Great Game" was used to describe competition for power and influence in Afghanistan, and neighboring central and south Asia territories, between the British and Russian empires.
Two centuries later, an American superpower has been reminded of a similar reality.
The Afghanistan debacle, in which a 300,000-strong U.S.-trained and equipped Afghan Army collapsed in hours serves as a reminder of the limits of American power in the wider Middle East.
U.S. President Joe Biden may be enduring the sharpest criticism for a disastrously executed withdrawal. But there is plenty of blame to go around, dating back to the original ill-fated decision to "nation build" a country that has resisted outside interference for thousands of years.
After the fall of Kabul and the hasty U.S. withdrawal from a country on which it had squandered $1 trillion, the question remains: What's next for the Middle East?
This is a question whose arc stretches from Morocco in the west to Pakistan in the east, from Turkey in the north down into the Gulf and across to the Horn of Africa.
Every corner of the Middle East and North Africa will be touched in some way by the failure of American authority in Afghanistan, the longest war in its history.
Afghanistan is different in the sense that while America's credibility and self-confidence was battered in Vietnam, it remained the dominant military force in the western Pacific before China's rise.
In the Middle East, a diminished Washington — in which confidence in its ability to stand by its commitments has been shaken, if not shattered — will find that its authority will be much questioned.
This comes at a time when China and Russia are testing American resolve globally. In the region itself, Turkey and Iran are already seeking to fill a vacuum exposed by an American failure.
Beijing and Moscow, for their own reasons, have an interest in Afghanistan's future. For China that goes beyond just sharing a border, while for Russia it is historical concerns about Afghan extremism infecting its own Muslim populations and those of nation states on its periphery.
Recently, China has been cultivating Taliban leaders. Its foreign minister Wang Yi held a well-publicized meeting with the Afghan Taliban's political chief Mullah Abdul Ghani Baradar last month.
Then there is Pakistan, which has supported the Taliban both covertly and overtly over the years. Islamabad will see in the American extreme discomfort opportunities for itself to assume a more significant regional role.
This is not to forget Pakistan's close ties to China, and its fractious relationship with the United States.
In Afghanistan itself, the Taliban may live up to its undertakings that it has changed and that it will seek to establish consensus rule in a country riven by bloody ethnic and tribal divisions.
Given early indications of brutal Taliban reprisals against its enemies and the panicked reaction of shell-shocked Afghan population it would take a leap of faith to believe much has changed.
What Implications Will It Have in the Middle East?
Will the al-Qaida and Islamic State franchises be allowed to reestablish themselves in a Taliban-controlled Afghanistan? Will the Taliban reemerge as a state sponsor of terrorism? Will it continue to allow Afghanistan to be used as a giant market garden in the opium trade?
In other words, will the Taliban change its ways and behave in such a manner that it does not constitute a threat to its neighbors, and the region more generally?
From America's perspective, its exit from Afghanistan leaves its attempts to breathe life into the nuclear deal with Iran as its main piece of unfinished Middle East business — if we put aside the seemingly intractable Israel-Palestine dispute.
Attempts to revive the Joint Comprehensive Plan of Action (JCPOA) have formed a cornerstone of the Biden administration's efforts to engage more constructively in the Middle East.
Progress has been faltering. The election of a new hardline Iranian president further complicates efforts to achieve compromise. Failure to resuscitate the JCPOA, abandoned by President Donald Trump, will add a new layer of uncertainty — and risk — to Middle East calculations.
There will have been no more interested party in developments in neighboring Afghanistan than the leadership in Tehran. Iran's relationship with the Taliban has been fraught at times, cooperative at others, given the anxiety in Tehran over mistreatment of Afghanistan's Shia population.
Shia Iran and the Sunni fundamentalist Taliban are not natural partners.
Further afield, the latest developments in Afghanistan will be capturing the close attention of Gulf states. Qatar has provided a diplomatic haven for the Taliban during peace talks with the vanquished Ghani government. This peace initiative, under U.S. auspices, is now revealed to have been a foil for the Taliban's ambitions to return to power in its own right.
How any reasonable observer could have believed otherwise is confounding.
Saudi Arabia will be unsettled by developments of the past few days because it is not in Riyadh's interests for American authority in the region to be undermined. But the Saudis have their own longstanding links with the Taliban.
In Saudi Arabian foreign policy, Afghanistan is not a zero-sum game.
More generally, the hit to U.S. standing in the region will be worrying for its moderate Arab allies. This includes Egypt and Jordan. For both, with their own versions of the Taliban lurking in the shadows, events in Afghanistan are not good news.
The Taliban success in Afghanistan will also have implications for the most combustible corner of the Middle East. In both Iraq and parts of Syria where the U.S. maintains a military presence, the American exit will be unsettling.
In Lebanon, which has become to all intents and purposes a failed state, the Afghanistan debacle will be adding to the gloom.
Israel will be calculating the implications of the setback suffered by its principal ally. Increased Middle East instability would not seem to be to Israel's advantage.
In this next phase, America will no doubt pull back from all but its most pressing Middle East commitments. This will be a time for it to reflect on what lessons might be learned from the painful Afghanistan experience.
One lesson that should be paramount as far as America and its allies are concerned: Fighting "failed state" wars is a losing proposition.