Safavid rule. They were said to have defiled Sunni mosques by bringing pigs and wine inside, as well as taking advantage of underaged girls and 9-10 year old boys, with some of them ending up being killed, and their corpses thrown in front of their parents' homes. The Afghans, aggrieved by this treatment, sent complaints to Isfahan, but they were seized by Gorgin Khan's men at the court and thus never reached Soltan Hoseyn. Mir Ways planned to rebel against the Georgians, but was soon arrested and brought to Isfahan under the orders of Gorgin Khan, who was suspicious of him. The latter urged Soltan Hoseyn to eliminate him, or at least prohibit him from going back to Qandahar. During his stay at Isfahan, Mir Ways observed the fragility of the Iranian regime, as well as the possibility to benefit from the factional strife there. Through proficient flattery and bribery, he successfully reintegrated himself. He persuaded Soltan Hoseyn that Gorgin Khan was not trustworthy, as he planned to make his rule in Qandahar autonomous, and also planned a Russo-Georgian alliance against Iran. The rebellion of Mir Ways Mir Ways was given permission to go on a pilgrimage to Mecca, where he convinced the religious authorities to declare a fatwa that gave the Afghans the right to become independent of Iranian control. In 1708, he was sent back to Qandahar as a shadow administrator, where he launched a massive rebellion. In April 1709, the Afghans made a surprise attack against Gorgin Khan and his retinue, killing them in their tents. They subsequently took control over Qandahar, and massacred its Georgian garrison. The news of these developments did not motivate the government to take action. Soltan Hoseyn instead sent two emissaries in a row to protest, but they were both jailed. Soltan Hoseyn then responded by selecting Gurgin Khan's nephew Khosrow Khan (Kay Khosrow) as the commander of the Afghan expedition. The latter had previously served as the darugha (prefect) of Isfahan, and following Gorgin Khan's death became the new sepahsalar and vali of Georgia. Khosrow Khan struggled to prepare the expedition, as he was given an insufficient amount of 7,000 to pay for 3,000 soldiers. The grand vizier, as well as members of the anti-Georgian court faction, greatly hindered the release of funds for the expedition. Khosrow Khan instead found reassurance through military support by the Herat-based Afghan Abdali tribe, the