Prominent 19th century Khivan writers include Shermuhammad Munis and his nephew Muhammad Riza Agahi. Muhammad Rahim Khan II of Khiva also wrote ghazals. Musa Sayrami's "Tārīkh-i amniyya", completed 1903, and its revised version "Tārīkh-i ḥamīdi", completed 1908, represent the best sources on the Dungan Revolt (1862–1877) in Xinjiang.