Tariqas were brought to China in the 17th century by Ma Laichi and other Chinese Sufis who had studied in Mecca and Yemen, and had also been influenced by spiritual descendants of the Kashgarian Sufi master Afaq Khoja.