The Qajars were a Turkmen tribe that held ancestral lands in present-day Azerbaijan, which then was part of Iran. In 1779, following the death of Mohammad Karim Khan Zand, the Zand Dynasty ruler of southern Iran, Agha Mohammad Khan, a leader of the Qajar tribe, set out to reunify Iran. Agha Mohammad Khan defeated numerous rivals and brought all of Iran under his rule, establishing the Qajar dynasty. By 1794 he had eliminated all his rivals, including Lotf 'Ali Khan, the last of the Zand dynasty, and had reasserted Iranian sovereignty over the former Iranian territories in Georgia and the Caucasus. Agha Mohammad established his capital at Tehran, a village near the ruins of the ancient city of Ray (now Shahr-e Rey). In 1796 he was formally crowned as shah. Agha Mohammad was assassinated in 1797 and was succeeded by his nephew, Fath Ali Shah

The history of Iran is a subject attracting increasing interest, and the history of the Qajar period, dated as 1796-1925, occupies a pivotal transitional place in Iranian history. The Qajars were a Turkmen tribe that held ancestral lands in present-day Azerbaijan, which then was part of Iran. In 1779, following the death of Mohammad Karim Khan Zand, the Zand Dynasty ruler of southern Iran, Agha Mohammad Khan, a leader of the Qajar tribe, set out to reunify Iran. The Qajar rulers reunited Iran after a century of weakness and division, and helped create modern Iran and its response to western power. Although the Qajars were not great reformers, their period saw the development of many new trends of thought, ranging from new religious ideas and groups to the adapting of modern ideas to Iranian circumstances. The period 1796-1925 saw a flowering of Iran's visual arts, politically oriented literature, popular culture, and crafts and carpets, and the beginnings of photography and film.