Invasions of Afghanistan
Afghanistan is a mountainous landlocked country at the crossroads of Central and South (Southern) Asia. Some of the invaders in the history of Afghanistan include the Maurya Empire, the ancient Macedonian Empire of Alexander the Great, the Rashidun Caliphate, the Mongol Empire led by Genghis Khan, the Timurid Empire of Timur, the Mughal Empire, various Persian Empires, the British Empire, the Soviet Union, and most recently the United States with a number of allies in response to the September 11 attacks. A reduced number of NATO troops remained in the country in support of the government under the U.S.–Afghanistan Strategic Partnership Agreement. Just prior to American withdrawal in 2021, the Taliban regained control of the capital Kabul and most of the country. They changed Afghanistan's official name to the Islamic Emirate of Afghanistan. Purpose
From a geopolitical perspective, controlling Afghanistan is vital in controlling the rest of Southern Asia, or getting a passage through Central Asia, reflecting its geographic position in the region. Afghanistan played an important part in the Great Game power struggles. Historically, the conquest of Afghanistan has also played an important role in the invasion of India from the west through the Khyber Pass. History of Afghanistan

Persian conquests
While relatively little detail is known, parts of the region of modern day Afghanistan came under rule of the Median kingdom for a short time. Afghanistan fell to the Achaemenid Empire after it was conquered by Darius I of Persia. The area was divided into several provinces called satrapies, which were each ruled by a governor, or satrap. These ancient satrapies included: Aria (Herat); Arachosia (Kandahar, Lashkar Gah, Bamiyan and Quetta); Bactriana (Balkh); and Gandhara (Kabul and Peshawar). Greek conquest and Kushan invasions
Alexander the Great invaded what is today Afghanistan in 330 BC as part of war against Persia. Comprising the easternmost satrapies of Persia, Afghanistan provided some challenging battles in his conquest of the remaining lands of Persia. Renamed Bactria, and settled with his Ionian veterans, Alexander began his invasion of India from what is now Jalalabad, attacking the Indus River basin through the Khyber Pass. Several cities in Afghanistan are named for Alexander, including Alexandria Arachosia, now called Kandahar (a contraction of Iskandahar). Following the death of Alexander and the partition of his kingdom, the Province of Bactria was under the rule of Alexander's former general, Seleucus, who now formed the Seleucid Dynasty, with its capital in Babylon. But the Greek Soldiers in Bactria, based on the remoteness of their territory, declared independence, defeated Seleucid armies sent to reconquer them, and founded the Greco-Bactrian kingdom, which lasted for more than three centuries in Afghanistan, and western India. This Greek kingdom called Bactria carried on Greek culture while completely cut off from Europe for three centuries. One of the cities, Ai-Khanoum was excavated in 1970s, showing a complete Greek city with an acropolis, amphitheater, temples, and numerous statues. Greek art has been found in Bactria showing influence from Indian Buddhist art creating something of an hybrid artistic style. Bactrian King Menander I converted to Buddhism after staging multiple theological and philosophical debates between his Greek priests and Indian Buddhist monks. Menander I is remembered in Buddhist Sutras as "King Milinda of the Yunani." The Ionian origin of the Greek veterans who settled Bactria is remembered to this day by the Afghan word for Greeks, which is "Ionani." Bactrian Greeks left a legacy of coinage, architecture, and Buddhist art, which comprised the Gandhara culture, especially the Greco-Buddhist art affecting all of East Asia to this day. The last Greek Kingdom in Afghanistan was conquered by the Kushan invaders in the first century AD, a full three centuries after Alexander. But Greek language continued to be used by the Kushans in their coinage for the next several centuries. Conquest by Arab Caliphate
In the seventh to ninth centuries, following the disintegration of the Sassanid Persian Empire and Roman Empire, leaders in the world theater for the last four centuries and archrivals, the area was again invaded from the west, this time by Umar, second Caliph of the Rashidun Caliphate, in the Islamic conquest of Afghanistan, eventually resulting in the willing conversion of most of its inhabitants to Islam. This occurred over many centuries by Afghans willingly converting or by Afghan leaders who pressured certain populations in the land to convert such as Abdul Rahman Khan forcing the Nuristani people to conver to Islam. This was one of many Muslim conquests following the establishment of a unified state in the Arabian Peninsula by the prophet Muhammad. At its height, Muslim control - during the period of the Umayyad Caliphate -  extended from the borders of China to the Iberian Peninsula (modern day Spain and Portugal), the Middle East, North Africa, parts of southern Europe, parts of south East Europe, parts of central Asia, and parts of South Asia. Mongol Empire
In the Mongol invasion of the Khwarazmian Empire (1219–1221), Genghis Khan invaded the region from the northeast in one of his many conquests to create the huge Mongol Empire. His armies slaughtered thousands in the cities of Kabul, Kandahar, Jalalabad etc. After Genghis Khan returned to Mongolia, there was a rebellion in the region of Helmand which was brutally put down by his son and successor, Ogedei Khan, who killed all male residents of Ghazni and Helmand in 1222; the women were enslaved and sold. Thereafter most parts of Afghanistan other than the extreme south-eastern remained under Mongol rule as part of the Ilkhanate and the Turko-Mongol Chagatai Khanate. The Hazara people claim to be descendants of the Mongol (Turko-Mongol) and Turkic invaders mixed with the local indigenous Turkic and Iranic populations, though this is disputed because the first mention of Hazara people is made by Babur in the 16th century. Additionally, many areas of Afghanistan are named after Mongol and Turkic leaders, including Band-e-Timur (meaning "Timur's block") in Maywand District in Kandahar Province, the only district never taken from the Taliban throughout the western invasion of the 21st century, Jaghatu District in Ghazni  province, and Jaghatu District in Maidan Wardak province (named in honor of the Turko-Mongol Chagatai Khanate) and the village of Wech Baghtu in Shah Wali Kot District in Kandahar province, named after Batu. Conquest by Tamerlane (Timur) and Mughal Empire 
From 1383 to 1385, the Afghanistan area was conquered from the north by Timur, leader of neighboring Transoxiana (roughly modern-day Uzbekistan, Tajikistan, and adjacent areas), and became a part of the Timurid Empire. Timur was from a Turko-Mongol tribe and although a Muslim, saw himself more as an heir of Genghis Khan. Timur's armies caused great devastation and are estimated to have caused the deaths of 17 million people. He brought great destruction on Afghanistan's south, slaughtering thousands and enslaving an equal number of women. Allied with the Uzbeks, Hazaras and other Turkic communities in the north his dominance over Afghanistan was long-lasting, allowing him for his future successful conquests in Central Anatolia against the Ottomans. In the next period, no part of Afghanistan ever came under rule of various Delhi Sultanate. After the slow disintegration of the Timurid Empire in 1506, the Mughal Empire was later established in Afghanistan, Pakistan, and India by Babur in 1526, who was a descendant of Timur through his father and possibly a descendant of Genghis Khan through his mother. By the 17th century, the Mughal Empire ruled most of India, but later declined during the 18th century. The Sikh Empire invasion, 1837–1838 
In the beginning of 1837, the Battle of Jamrud was fought between the Sikhs under Maharajah Ranjit Singh and the Afghans under Emir Dost Muhammad Khan. Since the consolidation of the Sikh Empire in Punjab, Maharajah Ranjit Singh had tried a wave of invasions on Afghanistan. The Afghans had been losing their long held territories to Sikhs over the preceding years due to internal conflicts, and had seen their once mighty empire disintegrating. Maharaja Ranjit Singh availed himself of anarchy in Kabul and attempted to invade Peshawar, the South-West-Eastern frontiers of Peshawar with Punjab which were governed by Sultan Mohammad Khan. The Sikhs under General Hari Singh Nalwa annexed the region after successfully routing the Afghans during the Battle of Peshawar (1834). The Maharajah appointed Jahan Dad Khan, ex-governor of Attock as the new governor of Peshawar in November 1838. Nalwa was killed at the Battle of Jamrud, ending the Afghan-Sikh wars. British invasions: 1838–1842, 1878–1880 and 1919
During the 19th and early 20th centuries, Afghanistan was invaded three times from British India. The First Anglo-Afghan War of 1838–1842 was conducted with the intention of limiting Russian influence in the country and quelling raiding from across the border. Within four years the British were expelled. After the Indian Mutiny, the British launched a second invasion, the Second Anglo-Afghan War of 1878–1880, for much the same reasons but did not attempt to maintain a permanent presence. A third conflict broke out in 1919. It lasted for three months, from May to August, and ended in a compromise that saw Afghanistan reassert its independence and control over its relations with other countries while agreeing to a border with British India known as the Durand Line. This line is still the border between Pakistan and Afghanistan today. Soviet invasions: 1929, 1930 and 1979

The Soviet Union invaded Afghanistan in 1929 against the Saqqawists and again in 1930 to fight the Basmachi movement. The Soviet Union, along with other countries, was a direct supporter of the new Afghan government after the Saur Revolution in April 1978. However, Soviet-style reforms introduced by the government such as changes in marriage customs and land reform were not received well by a population deeply immersed in tradition and Islam. The oppressive nature of the Democratic Republic of Afghanistan, which executed political prisoners and purged the government of any opposition, was also seen unfavorably by the Afghan population. By 1979, fighting between the Afghan government and various other factions within the country, some of which were supported by the United States and other countries, led to a virtual civil war and in a phone call to the Kremlin in March 1979 Afghan prime minister Nur Muhammad Taraki requested military assistance. This was refused by Soviet prime minister Alexei Kosygin on behalf of the Politburo. After Taraki was murdered the new Afghan Prime Minister Hafizullah Amin repeated requests for Soviet military support, at least to protect his residence. Finally, in December the Politburo decided to deal with the situation in Afghanistan, and in early December sent special forces which attacked Amin's palace and killed him, putting the exiled Babrak Kamal in his place. These forces were subsequently reinforced by the 40th Army which entered Afghanistan on 24 December 1979. As the Kremlin foresaw, this intervention would cause problems around the world for the USSR, with the policy of détente and, not least, at the forthcoming Olympic Games due to take place in summer 1980 in Moscow. The result was a far-reaching boycott of the 1980 Summer Olympics in Moscow, supported not only by the United States but by many of the 65 other invited countries that did not take part. At its greatest extent the Soviet military contingent in Afghanistan numbered 100,000 personnel. This presence remained for a decade and kickstarted U.S. and Saudi funding for Islamic Mujahideen groups opposed to both the Afghan government and the Soviet military presence. The local Mujahideen, along with fighters from several different Arab nations (Pathan tribes from across the border also participated in the war; they were supported by the Pakistani ISI), fought the Soviet forces to a standstill. On 24 January 1989 Gorbachev's Politburo took the decision to withdraw most of the Soviet forces, while continuing to provide military assistance to the Afghan government. Eventually, in-fighting within the Mujahideen led to the rise of warlords in Afghanistan, and from them emerged the Taliban. The Soviets left behind the only highway in the country as well as many concrete structures built in the major cities, and airfields that are still in use (e.g. at Bagram). American invasion and counterinsurgency: October 2001 – August 2021

On October 7, 2001 the United States began an invasion of Afghanistan under Operation Enduring Freedom. The invasion was launched to capture Osama bin Laden, who was the mastermind of the September 11 attacks, and was being sheltered by the Taliban. The US military forces did not capture him, though they toppled the Taliban government and disrupted bin Laden's Al-Qaeda network. On May 2, 2011, bin Laden was shot and killed by United States Armed Forces in Pakistan. The Taliban leadership persisted by hiding throughout Afghanistan, largely in the southeast, and launched guerrilla attacks against forces of the United States, its allies, and the government of President Ashraf Ghani. In 2006, the US forces turned over security of the country to NATO-deployed forces in the region, integrating 12,000 of their 20,000 soldiers with NATO's 20,000. The remainder of the US forces continued to search for Al-Qaeda militants. The Canadian military assumed leadership and almost immediately began an offensive against areas where the Taliban guerrillas had encroached. At the cost of a few dozen of their own soldiers, the British, American, and Canadian Forces managed to kill over 1,000 alleged Taliban insurgents and sent thousands more into retreat. Many of the surviving insurgents, however, began to regroup and soon after began to engage both NATO and Afghan National Army forces, starting a protracted war that lasted until 2021, with the withdrawal of Western forces and the Taliban takeover of Kabul. 