Fath-Ali Shah Qajar (; 5 August 1772 – 24 October 1834) was the second Shah of Qajar Iran. He reigned from 17 June 1797 until his death on 24 October 1834. His reign saw the irrevocable ceding of Iran's northern territories in the Caucasus, comprising what is nowadays Georgia, Derbent, Azerbaijan, and Armenia, to the Russian Empire following the Russo-Persian Wars of 1804–1813 and 1826–1828 and the resulting treaties of Gulistan and Turkmenchay., page 728 These two treaties are closely tied to Fath-Ali Shah's legacy amongst Iranians, who often view him as a weak ruler.

Fath-Ali Shah successfully restructured a mostly Turkic tribal khanship into a centralized and stable monarchy based on the old imperial design. This brought to Iran a relatively calm and prosperous period, secured a mutually beneficial relationship between state and religion, established foundational principles of state administration, and supported cultural and artistic revival, which remained a distinctive feature of the Qajar dynasty. At the end of his reign, his mounting economic problems and declining military power took Iran to the verge of ruin. The situation was further complicated by the subsequent struggle for the throne that ensued after his death. Fath-Ali Shah had many portraits of himself and his court created, with the intention to aggrandize his rule. These included most notably the rock reliefs which were created next to those left by the pre-Islamic Sasanian Empire (224–651) in Ray, Fars and Kermanshah. This was done in an effort to portray himself as heir to the ancient Persian empire, not just to his fellow countrymen but to all of posterity. An inscription is located in Cheshmeh-Ali in Rey, near Tehran.

Early life He was born on 5 August 1772 in the city of Damghan, then under the governorship of his father. He was called Fath-Ali, a name borne by his prominent great-grandfather, Fath-Ali Khan Qajar. But he was mainly known by his second name of Baba Khan until his coronation in 1797. However, the Russians still called him Baba Khan until 1813, as they refused to recognize his rule. He was the eldest son of Hossein Qoli Khan Qajar (the brother of Agha Mohammad Khan Qajar) and the daughter of the Mohammad Agha Ezz al-Dinlu of the Ashaqa-bash branch of the Qajar tribe. Due to Hossein Qoli Khan being suspected of plotting to rebel against the Zand dynasty, Baba Khan (then aged five) was sent as a hostage to the court of the Zand ruler Karim Khan Zand () in Shiraz. There, Baba Khan joined his uncle Agha Mohammad Khan, who was also a hostage at the court.

Baba Khan later returned to Damghan (according to the 19th-century Iranian writer Reza-Qoli Khan Hedayat, this took place in 1775), where he was witness to the conflict amongst the Davallu Qajar chiefs of Astarabad, which ultimately led to the murder of his father by the Kuklan Turkmens in 1777. Baba Khan sought shelter with his uncle Morteza Qoli Khan Qajar in the village of Anzan (near Astarabad), where he stayed for two years. Following the death of Karim Khan in 1779, Baba Khan shifted his allegiance to Agha Mohammad Khan, who had returned to Mazandaran and overpowered Morteza Qoli and two other brothers in Barforush. Although Agha Mohammad Khan had been castrated at a young age, he married Baba Khan's mother in Sari and practically became his stepfather and guardian.

In 1780, Baba Khan and Agha Mohammad Khan were captured in Baforush by the latter's brother Rezaqoli Khan Qajar, who was displeased with the favour that Baba Khan received from Agha Mohammad Khan. They were eventually released, and in 1781 Baba Khan seized Damghan from Qader Khan Arab Bestami, thus recovering his father's former domain. Baba Khan also captured and married Qader Khan's daughter Badr Jahan. In 1783, Baba Khan married his first Qajar wife, Asiya Khanom Devellu in Sari. The marriage was a political union organized by Agha Mohammad Khan to make peace with the Yokhari-bash branch of the Qajars, the clan of Asiya Khanom. Following Agha Mohammad Khan's accession to the throne at Tehran on 21 March 1786, Baba Khan was designated as his heir and vice-regent.

Baba Khan took part in his uncle's war with the Zands in southern Iran, where he in 1787 narrowly succeeded in defeating the governor of Yazd, Mohammad-Taqi Bafqi, who acknowledged Qajar suzerainty. Baba Khan then went to Gilan to protect it against Qajar chiefs whose loyalty was questionable.

Baba Khan was governor of Fars when his uncle was assassinated in 1797. Baba Khan then ascended the throne and used the name of Fath Ali Shah (with the word "shah" added to his name). He became suspicious of his chancellor Ebrahim Khan Kalantar and ordered his execution. Hajji Ebrahim Khan had been chancellor to Zand and Qajar rulers for some fifteen years. Much of his reign was marked by the resurgence of Persian arts and painting, as well as a deeply elaborate court culture with extremely rigid etiquette. In particular, during his reign, portraiture and large-scale oil painting reached a height previously unknown under any other Islamic dynasty, largely due to his personal patronage.

Fath Ali also ordered the creation of much royal regalia, including coronation chairs; the "Takht-e Khurshīd" or Sun Throne; the "Takht-e Nāderi" or Naderi Throne, which was also used by later kings; and the "Tāj-e Kiyāni" or Kiani Crown, a modification of the crown of the same name created by his uncle Agha Mohammad Khan. The latter, like most of his regalia, was studded with a large number of pearls and gems.

In 1797, Fath Ali was given a complete set of the Britannica's 3rd edition, which he read completely; after this feat, he extended his royal title to include "Most Formidable Lord and Master of the Encyclopædia Britannica." In 1803, Fath-Ali Shah appointed his cousin Ebrahim Khan as the governor of the Kerman province, which had been devastated during the reign of Agha Mohammad Khan.

In Khorasan, there would be a growing revolt led by Nader Mirza, who would restore the Afsharid dynasty. The Shah's control was so limited in fact that an 1800–1801 tax register listed only Sabzevar and Neyshabur as paying taxes to the government, while the rest of the local Khorasani leaders paid no taxes to the state at all.

Coronation On 28 July 1797, Baba Khan ascended the throne of Iran in Shiraz. He ordered minting coins in Shiraz and Tehran initially as Soltan Baba Khan and later as Fath-Ali Shah. Minting coins under the shah's name, which was a precedent away from traditional coins minted with a Shia Imam's name, signified his hold to full sovereignty. His official coronation ceremony was held in Tehran on 19 March 1798, in which three celebration days were coincided, i.e., Nowruz, Fitr, and the shah's coronation. Ebrahim Khan served as his grand minister (grand vizier) with nearly full authority over the army and administration.

Russo-Persian Wars (1804–1828) Russo-Persian War (1804–1813)

During the early reign of Fath Ali Shah, Imperial Russia took control of Georgia, a territory which Iran had ruled intermittently since 1555 with the Peace of Amasya. Georgia, led by Heraclius II, had forged an alliance with Iran's rival, Russia, following the Treaty of Georgievsk. To punish his Georgian subjects, his uncle, Agha Mohammad Khan, had invaded and sacked Tbilisi, seeking to reestablish full Iranian suzerainty over Georgia, in which he succeeded. Even though the Russian garrisons in the city had to retreat, Iran did not manage to put back all of its needed garrisons over the country as Agha Mohammad Khan was assassinated soon afterwards in Shusha, following with Russia's act of annexation of those previously-Iranian ruled parts of Georgia in 1801, after many Georgian embassies and a treaty. Also, not only was Georgia annexed, but Dagestan was also invaded, which had also been under Iranian rule since the early Safavid era. As it was seen as a direct intrusion into Iranian territory, Fath Ali Shah, determined to reassert Iranian hegemony over the whole region, declared war on Russia after General Pavel Tsitsianov attacked and stormed the city of Ganja, massacring many of its inhabitants and forcing many thousands to flee deeper within the Iranian domains. In 1804, Fath Ali Shah ordered the invasion of Georgia in order to regain it, under pressure from the Shia clergy, who were urging a war against Russia. The war began with notable victories for the Iranians, but Russia shipped in advanced weaponry and cannons that disadvantaged the technologically inferior Qajar forces, who did not have the artillery to match. Russia continued with a major campaign against Iran; Iran asked for help from Britain on the grounds of a military agreement with that country (the military agreement was signed after the rise of Napoleon in France). However, Britain refused to assist Iran, claiming that the military agreement concerned a French attack, not a Russian one.

Iran had to ask for help from France, sending an ambassador to Napoleon and concluding a Franco-Persian alliance with the signature of the Treaty of Finkenstein. However, just when the French were ready to help Iran, Napoleon made peace with Russia. At this time, John Malcolm arrived in Iran and promised support, but Britain later changed its mind and asked Iran to retreat. Though the war had been stale for many years and was located in various parts of Transcaucasia, the peace with Napoleon enabled the Russians to increase their war efforts in the Caucasus against Iran. In early 1813, under General Pyotr Kotlyarevsky, the Russians successfully stormed Lankaran. Russian troops invaded Tabriz in 1813, and Iran was forced to sign the Treaty of Gulistan with Russia.

Siege of Erivan

After the siege of Ganja, the Russians under Pavel Tsitsianov proceeded to Erivan, besieging it. The Iranian forces inside Erivan's citadel prevented the Russians from making a direct attack, while those outside the citadel surrounded the Russians and cut the invaders' supply lines. Commanded by Fath Ali Shah and Abbas Mirza, the Iranians successfully defended the city and defeated the Russian attack.

Treaty of Gulistan

On account of consecutive defeats of Iran and after the fall of Lankaran on 1 January 1813, Fath Ali Shah was forced to sign the disastrous Treaty of Gulistan. The text of the treaty was prepared by a British diplomat, Sir Gore Ouseley, and was signed by Nikolay Rtishchev from the Russian side and Mirza Abolhassan Khan Ilchi from the Iranian side on 24 October 1813 in the village of Gulistan.

By this treaty all of the cities, towns, and villages of Georgia, villages and towns on the coast of the Black Sea, all of the cities, towns and villages of the Khanates in the South Caucasus and North Caucasus, and part of the Talysh Khanate, including Megrelia, Abkhazia, Imeretia, Guria, Baku khanate, Shirvan Khanate, Derbent, Karabakh khanate, Ganja khanate, Shaki Khanate and Quba Khanate became part of Russia.John F. Baddeley, The Russian Conquest of the Caucasus, Longman, Green and Co., London: 1908, p. 90 These territories altogether comprise modern-day Georgia, southern Dagestan, and most of the contemporary Azerbaijan Republic. In return, Russia pledged to support Abbas Mirza as heir to the Iranian throne after the death of Fath Ali Shah.

Interlude on a different front Between 1805 and 1816, Qajar rulers began invading Herat in neighboring Afghanistan with small detachments. The Iranians were attempting to retake control of the city but were forced to abandon it due to Afghan uprisings. In 1818 the Shah sent his son Mohammad Vali Mirza to capture the city but he was defeated at the Battle of Kafir Qala.

Russo-Persian War (1826–1828)