The Muslim Ming loyalists were then crushed by the Qing with 100,000 of them, including Milayin, Ding Guodong, and Turumtay killed in battle. The Confucian Hui Muslim scholar Ma Zhu (1640–1710) served with the southern Ming loyalists against the Qing. During the Qianlong era (17351796), scholar Wei Shu () commented on Jiang Tong's () essay "Xironglun" (), stating that if the Muslims did not migrate, they would end up like the Five Hu, who overthrew the Western Jin and caused an ethnic, rather than religious, conflict to break out between the Five Hu and the Han Chinese. During the Qianlong Emperor's reign, there were clashes between the Qing authorities and the Jahriyya Sufi sect, but not with the majority non-Sufi Sunnis or the Khafiyya Sufis. Chinese Muslims had traveled to West Asia for many years prior to the Hui Minorities' War. In the 18th century several prominent Muslim clerics from Gansu studied in Mecca and Yemen under Naqshbandi Sufi teachers. Two different forms of Sufism were brought back to northwest China by two charismatic Hui sheikhs: Khufiyya, associated with Ma Laichi (1681–1766), and the more radical Jahriyya, founded by Ma Mingxin (1719?–1781). These coexisted with the more traditional, non-Sufi Sunni practices, centered around local mosques and known as "gedimu" (qadim, or ). The Khufiyya school and non-Sufi gedimu tradition—both tolerated by Qing authorities—were referred to as "Old Teaching" (), while Jahriyya, viewed by authorities as suspect, became known as the "New Teaching" (). Disagreements between adherents of Khufiyya and Jahriya, as well as perceived mismanagement, corruption and the anti-Sufi attitudes of Qing officials, resulted in uprisings by Hui and Salar followers of the New Teaching in 1781 and 1783, but these were promptly suppressed. Hostilities between different groups of Sufis contributed to the violent atmosphere before the Dungan revolt between 1862 and 1877. In the Jahriyya revolt sectarian violence between two suborders of the Naqshbandi Sufis, the Jahriyya Sufi Muslims and their rivals, the Khafiyya Sufi Muslims, led to a Jahriyya Sufi Muslim revolt which the Qing dynasty in China crushed with the help of the Khafiyya Sufi Muslims.