On the positive side, however, Iran endured her despots, assimilated the various invading cultures and altered the imposed religion. Most importantly, the national frame endured and sustained all hardships to remain a viable entity. The Qajar dynasty ruled Iran from the end of the eighteenth century to the early twentieth century. From a Turkic tribe in north-east Iran, the great body of them had settled at Astarabad (present day Gorgan) near the south-eastern corner of the Caspian Sea. When Nader Shah Afshar died in 1747 with no living heirs, the Qajar tribal leaders were among the contenders for the throne. From the ensuing 50 year struggle one Aqa Mohammad Khan Qajar (c .1742- c.1797) emerged the undisputed ruler in 1794. He was crowned in 1796 and founded the dynasty.
Aqa Mohammad Khan had been castrated in childhood by the enemies of his father and was one of the crudest kings even by eighteenth-centuiy Iranian standards. In his quest for power he razed cities, massacred entire populations, and in an act of singular cruelty blinded some 20,000 men in the city of Kerman solely because the local populace had chosen to defend the city against his siege. He was, however, an extraordinary leader and the last of the great conquerors of Central Asia, basing his strength on tribal manpower in the mould of Genghis Khan, Teimur (Tamurlane) and Nader Shah. He is in many ways the initial architect of Iran as we know it today. The mere fact that the dynasty he founded and the countiy managed to survive into the twentieth century free of official colonial status says something of his abilities.
Aqa Mohammad Khan was assassinated by one of his military commanders in 1797 and the throne passed to his nephew who was crowned Path All Shah. Path All contributed little to the country and is remembered for his ruinous wars with Russia in which Iran lost all her territory on the west coast of the Caspian Sea. Beginning in the eighteenth century Russia’s foreign policy was aimed at territorial expansion. With Poland and Sweden to the west having lost their former power and no longer posing a threat, Russia drove towards expansion in the south and east: Turkey, Iran, Afghanistan, India, Tibet and China.
Russia annexed Georgia at the turn of the nineteenth century. Iran, which had ruled the land for centuries, fought to retain Georgia but was badly defeated. Peace came in 1813 and under the Treaty of Golestan Iran renounced all claims to Georgia and lost most of her Caucasian provinces including Derbent, Baku and Shirvan. The Caspian Sea became virtually a Russian lake. Peace was short-lived and in 1825 the Russians seized the territory between Erivan and Gochka Lake.
This time Iran reluctantly went to war and in 1826 was again defeated. Through the Treaty of Turkamanchai in 1828 Iran ceded further provinces in the Caucasus, including Erivan and Nakhjavan, and made other political concessions, among them the disasterous grant of extra-territorial rights to the Russians. In return for these concessions, the north-western boundaries of Iran and Russia were permanently fixed and the Russians, who had earlier guaranteed the survival of the Qajar dynasty, reiterated the commitment. The treaty also stipulated that the line of succession for future kings of Iran would devolve from the male issue of Abbas Mirza.