The Tanguts were primarily Buddhists. Tangut Buddhism was influenced by external elements. The entire Chinese Buddhist canon was translated into the Tangut language over a span of 50 years and published around 1090 in about 3700 fascicles. Buddhism in the Tangut state is believed to be an amalgamation of Tibetan and Chinese traditions, among which the Huayan-Chan tradition of Guifeng Zongmi (Chinese: 圭峰宗密, 780–841) and his master Huayan Chengguan was the most influential. A number of texts previously believed to be of native Tangut origin turned out to be translations of Khitan source texts. The degree of Tibetan impact on the formation of Tangut Buddhism still remains unexplored, especially in the light of new discoveries showing that Tangut Buddhism owed more to the local culture in North China than to pure Tibetan or Chinese influences. Texts belonging to the Tibetan Mahamudra tradition demonstrate that Tangut Buddhism initially evolved along the Karma Kagyu rather than Sakya lines of Buddhist transmission.