Compared to its preceding dynasties, the geopolitical reach of the Zand dynasty was limited. Many of the Iranian territories in the Caucasus gained ''de facto'' autonomy, and were locally ruled through various Caucasian khanates. However, despite the self-ruling, they all remained subjects and vassals to the Zand king. Another civil war ensued after the death of Karim Khan in 1779, out of which Agha Mohammad Khan emerged, founding the Qajar dynasty in 1794.