Like during the Tang Dynasty, when many religions came to China from the West and from Inner Asia, Yuan China was open for many religions of the merchants coming from the West. Muslims were special allies of the Mongols and had therefore access to many positions prohibited to Chinese. A special place in the Mongol empire was reserved for Lamaism. Originally the native religion of Tibet and a mixture of shamanism and Buddhism, Lamaism enjoyed state protection by the Mongols after they supported the reform of the Yellow Cap sect of Tsong-ka-pa in Tibet. For his merit in making Tibetian Buddhism free from witchcraft and magic and restoring celibacy and monastic discipline, the head of the Yellow Cap sect was rewarded by the Mongols with the title Dalai Lama "Ocean of Wisdom". For the Mongols, the Tibetian religion was very attractive because of the influences of shamanism and because of its supreme philosophy. As Buddhism in China had already reached and surpassed the summit, the history of Chinese Buddhism was ready to be written down, like in the book Fozu Lidai Tongzai 佛祖歷代通載. Religion was also a vehicle for the masses rebelling against the harsh Mongol rule, against the exploitation by the exclusive class of Mongols and the rich Chinese gentry. The secret societies rebelling against Mongol rule combined Daoist with Buddhist elements and hoped that the Maitreya Buddha would descend from Heaven and save mankind. The White Lotus Society (Bailianjiao 白蓮教) of Mao Ziyuan 茅子元, and the White Cloud Society (Baiyunjiao 白雲教 ) of Kong Qingjiao 孔清覺 , recruited their followers among the saltern workers and the miners who especially felt the yoke of the Yuan exploitation. A third sect taking part in the overthrow of the Mongols was the secret society of the Red Turbans (Hongjin 紅巾).