While the governors of Li's reign in Tang Dynasty were putting down the turmoil caused by An Lushan and Shi Siming, the ancient Tibet took the advantage and occupied the vast areas of Hexi for as long as more than 70 years, thus brought about the coexistence of different religions in Dunhuang, such as Buddhism, Nestorianism, Mani's doctrine, Ben and Mazdaism. This article cites a lot of historical materials to give an exposition on the general situation and interrelation of the religions mentioned above.