The territories of present-day Afghanistan did not constitute a homogeneous political unit that from the century onwards. XVIII, also due to the geographical position, of transit between the Iranian and Indian worlds. Since the third millennium a. C. in fact they were the scene of complex encounters between different populations, until, conquered by Ciro and Darius (6th century BC), they then passed partly under Alexander the Great (329 BC) and entered the sphere of civilization Hellenistic. After a period of submission to the Indian empire of the Maurya (320-232 BC), around 250 the Indo-Greek dynasty of Bactriana established an independent kingdom there. Towards the sec. I d. C., Parti and Saka the territories were divided and in 90 all Afghanistan was conquered by the Kuṣāṇa, creators of a vast empire that lasted until the invasion of the White Huns (ca. 500), later ousted by an Iranian invasion, which gave rise to various autonomous principalities (6th century). In the following two centuries, the Arab invasion, with the progressive Islamization of the territory, brought the history of Afghanistan into the wider Persian history and therefore into that of the Arab and then Muslim empire. The dynasty of the Gasnavids (X-XII century) and that of the Khwārizm Shāh (XII century), followed in the century. XIII, the invasion of Genghis Khān, which determined the formation of various Mongolian principalities. Under the Timurid dynasty (15th century), Afghanistan enjoyed great prosperity, but in the 15th century. XVI Bâbur (progenitor of the Indian Moghūl) made it the basis for the conquest of India. For almost two centuries Afghanistan lost its independence, divided between the Moghūl and the Safawids, while already in the sec.
The first influences of Western powers were outlined in the 16th and 17th centuries; Afghanistan was assuming the function of a buffer state, to which its very existence as a state must be attributed, while not underestimating the weight of nationalistic tendencies. Afghanistan, independent since 1747 (when General Aḥmad), tried to implement a policy of expansion towards India, slowed down, towards the end of the century, by bitter dynastic struggles, complicated by British and Russian interventions. It was the latter who triggered the Persian invasion which had the immediate consequence of the English intervention (First Anglo-Afghan War, 1838-42). A period of neutralism in Afghanistan was followed by an Anglo-Afghan treaty of territorial respect (1854) and a second English intervention in favor of Afghanistan against Persia, while new tensions between Russia and England led to the second Anglo-Afghan war (1878 -79), concluded with a treaty (1880) that sanctioned the English pre-eminence.
Neutral in the First World War, according to cheeroutdoor, Afghanistan retried, in 1919, the invasion of Indian territories, triggering the third Anglo-Afghan war, concluded (Treaty of Rawalpindi, 1919) with the recognition of Afghan independence. Afghanistan then launched an autonomous foreign policy (agreements with the USSR, Turkey and Iran), while it welcomed a more accentuated Soviet penetration. In 1931 the first Constitution was enacted and in 1933 the king Muḥammad Ẓāhīr signed the Eastern Entente (with Iran, Iraq and Turkey), the first nucleus of modern pan-Islamism. After the end of the Second World War, the old Anglo-Russian antagonism was replaced by the US-Soviet one (Afghanistan still acted as a buffer). Admitted to the UN in 1946, Afghanistan began to receive economic aid from the USA and military-economic aid from the USSR, while maintaining rigorous neutralism. The border issue was rekindled with the formation of Pakistan which encompassed Pashtunistan inhabited by people similar to the Afghans; this gave a pretext to territorial claims of Afghanistan (1953), which resulted in armed incidents in 1961. In 1963 the situation improved and pending border issues were also settled with the USSR and China. In 1964, a Constitution more open to liberal needs was approved. Despite being essentially Muslim, Afghanistan was getting closer to India, also as a reaction to the never dormant border issues with Pakistan. In July 1973 King Muḥammad Ẓāhīr was overthrown by a coup d’état of progressive nobles led by Muḥammad Dā’ud, cousin of the same king: the Republic was proclaimed and, in 1977, a new Constitution was launched. The rapid moderate involution of the new political regime, however, led to a new coup in April 1978, which brought the Marxist-inspired Afghan People’s Democratic Party (PDPA) to power, headed by Muḥammad Taraki Nur, leader of the Khalq faction, who strengthened Afghanistan’s ties with the USSR. In September 1979 Taraki was killed and replaced in the political direction of the country by Hafizullah Amin, a former strongman of the previous government. Unable to control the situation, Amin was killed in December 1979 following a Soviet military intervention that allowed Babrak Karmal, founder of the communist Parcham faction, to take power.