 As a highly respected religious figure, he was in a clash with ruling elite of the Chagatai (Moghul) dynasty and this conflict had both a religious and secular nature.For the religious part he was an advocator of implementing Islamic Sharia law against Mongol Yassa law which was in force at that time while for the secular part he heavily criticized the luxurious lifestyle which the ruling elites enjoyed.This clash proved serious due to the fact that Chagatai Khan (c. 1185–1241 or 1242) had been appointed by Genghis Khan to see if the Yassa was observed so it eventually resulted in expelling of Afaq Khoja by Ismail Khan (1669, 1670–1678), the later ruler of the Yarkent Khanate.