Russians made five attacks on Khiva. Around 1602 some free Ural Cossacks unsuccessfully raided Khwarazm. In 1717 Alexander Bekovich-Cherkassky attacked Khiva from the Caspian. After he won the battle, Shir Ghazi Khan (1715–28) made a treaty and suggested that the Russians disperse so that they could be better fed. After they dispersed they were all killed or enslaved, only a few surviving to tell the tale. In 1801 an army was sent toward Khiva but was recalled when Paul I was murdered. In the Khivan campaign of 1839 Perovsky tried an attack from Orenburg. The weather was unusually cold and he was forced to turn back after losing many men and most of his camels. Khiva was finally conquered by the Khivan campaign of 1873. The Russians installed Sayyid Muhammad Rahim Bahadur Khan II as the vassal ruler of the region.