It is well known that Dunhuang literature was largely influenced by Buddhism, but it also held a close but complicated relationship to Confucianism. Confucianism was an important theme in Dunhuang literature but also demonized Confucius, joked about Confucian texts, and deconstructed the power of Confucianism because it was not satisfied with its authority. During the debates between Confucianism and Buddhism, Dunhuang literature actively adjusted its relationships to these two schools of thought by maintaining the already established basis of Confucianism while leaving space for the further development of Buddhism. In this way the unique style of Dunhuang literature took shape