rival, Ottoman Empire, from territorial gains in the region at the expense of declining Safavid Iran. The Russian victory ratified for Iran's cession of their territories in the Northern, Southern Caucasus and contemporary mainland Northern Iran, comprising the cities of Derbent (southern Dagestan) and Baku and their nearby surrounding lands, as well as the provinces of Gilan, Shirvan, Mazandaran, and Astrabad to Russia per the Treaty of Saint Petersburg (1723). The East Balochi raids The most exposed part of Iran's frontier was located in the extensive arid lands to the east. The area was populated by tribes that neither the Safavids nor the Mughals were ever successful in pacifying. In 1699, the Kerman province was overwhelmed by a Balochi invasion. In response, Soltan Hoseyn appointed the Georgian prince Gorgin Khan (George XI) as beglerbeg (governor) of Kerman. The latter had previously served as the vali (viceroy) of Georgia, but had been dismissed in 1688 for helping rebel forces against the Safavid governor of Kakheti. Brave and strong-willed during warfare, Gorgin Khan preferred to use as the solution to any problem. With the help of his brother Shahqoli Khan (Levan), he routed the numerically superior Balochis in various encounters. In 1703, as a result of incursions by the Afghans, Soltan Hoseyn appointed Gorgin Khan as the sepahsalar (commander-in-chief) and governor of Qandahar, as well as the vali of Georgia. Gorgin Khan's governorship of Qandahar At Qandahar, Gorgin Khan soon competed against Mir Ways, a chief of the Hotaki clan of the Afghan Ghilzai tribe, who also served as the kalantar (mayor) of the city. An affluent man from prominent family, Mir Ways was charitable towards his supporters and the poor. He had been under service of the Safavids for a long time, serving as the qafilah-salar, whose function was to patrol the caravan passage between Iran and India. However, he was dismissed as qafilah-salar in 1706, apparently due to his poor service and negligence of his responsibility in collecting fees and taxes. Meanwhile, the Afghan relations with Gorgin Khan had become uneasy due to his oppressive rule. Most sources agree that his rule started to become oppressive quickly after his assumption of power in Qandahar. The (nominally Shi'i) Georgian soldiers of Gorgin Khan concealed goods, seized Afghan girls and women, and increased taxes. They also disregarded the religious freedom that the Sunni Afghans had been guaranteed as a condition for accepting