Herat, capital of Herat province in western Afghanistan, is situated in the valley of the Hari River and the country's third largest city with a population of almost 450,000, including Tajiks, Turkmen and Uzbeks. During the 16th and 17th centuries the region owed allegiance to the Safavids of Persia (Iran), and even today the language spoken here is Dari, a dialect of Persian. The city is about 2,700 years old and has many historic buildings, although these have suffered damage in various military conflicts during the last few decades.
In late 330 B.C. Alexander the Great, according to his biographers, captured the ancient city of Artacoana and a new town and the citadel was built, either by Alexander himself or by his successors. It was part of the Seleucid, Parthian, and Sassanid empires until invaded in the 7th century by Arab armies who brought Islam and incorporated the area into the Abbasid Caliphate but under direct control of local dynasties. The Mongols invaded Afghanistan early in the 13th century, and both Genghis Khan and Tamerlane (Timur), who added it to his empire in 1383, wreaked havoc upon the city. Herat, however, recovered and experienced a period of splendour under Timur's successor, Shah Rukh, who established the Timurid capital there (1404-1507). During the Middle Ages Herat became one of the important cities of the Khorasan region: it was known as the Pearl of Khorasan.
In 1506 the city fell to the Turkic Uzbeks from central Asia, but after four years those were defeated by the Persian forces of Shah Ismail Safavi, the founder of the Safavid Empire to the west. The western region of present-day Afghanistan, together with the Iranian cities of Mashhad (Meshed) and Merv became part of the Safavid Empire. Safavid Persia prospered under Shah Abbas, who ruled from 1586-1628, but then decline set in. The eighteenth century saw revolts, anarchy and war and as a result the region had deteriorated into a very unstable group of tribal states; Herat's prosperity had gone, parts of the city were ruined and the once very efficient irrigation works had fallen into neglect.
In 1747, Ahmad Shah Durrani took possession of the city and it became part of the Durrani Empire until 1823, when its last ruler was killed. In 1824 the Emirate of Herat was independent, ruled over by Emir Mahmud (until his death in 1829) and his son Kamran until 1842 when he was assassinated. The Persians then besieged Herat and the British, who suspected the Russians behind it, sent in their first expedition in 1839 (the First Afghan War). The city was taken by the Persians in 1842 but with British help they were repelled and Herat fell to Dost Mohammad Khan of the Barakzai dynasty in 1863, making the city permanently part of Afghanistan.