The Qajar dynasty, also known as the Qajars, ruled Iran for approximately 130 years, from around 1175 to 1304 AH. This dynasty was established by Agha Mohammad Khan Qajar, and it was related to one of the Turkmen tribes of Iran known as the Qajar tribe. The Qajars migrated from Central Asia to Iran due to the Mongol invasion and initially settled around Armenia. The Qajar tribe was one of the seven main Qizilbash tribes whose military power Shah Ismail I relied upon to establish the Safavid dynasty. Due to their significant contributions to the Safavid court, the Qajars gained more power. Shah Abbas the Great later relocated a group of them to Astarabad, present-day Gorgan.
During the reign of the Qajar kings, territorial losses occurred due to various treaties, particularly during the reigns of Fath Ali Shah and Naser al-Din Shah, under pressure from Tsarist Russia. However, Agha Mohammad Khan Qajar managed to reclaim some Iranian territories in the east and west. Despite these challenges, the Qajar dynasty maintained power for over a century and remained the last Turkic-speaking royal dynasty in Iranian history. The Qajar family had several sub-branches, and their descendants today reside in Iran, the Republic of Azerbaijan, Europe, and the United States.