Luckily for the Buyids, Mardavij was shortly assassinated in 935, which caused chaos in the Ziyarid territories, a perfect situation for the Buyid brothers; Ali and Ahmad conquered Khuzistan, while Hasan captured the Ziyarid capital of Isfahan, and in 943 captured Rey, which became his capital, thus conquering all of Jibal.