The Northern Celestial Masters are an evolution of the Daoist Way of the Celestial Master () in the north of China during the Southern and Northern Dynasties. The Northern Celestial Masters were a continuation of the Way as it had been practiced in Sichuan province by Zhang Lu and his followers. After the community was forced to relocate in 215 CE, a group of Celestial Masters established themselves in Northern China. Kou Qianzhi, from a family who followed the Celestial Master, brought a new version of Celestial Master Daoism to the Northern Wei. The Northern Wei government embraced his form of Daoism and established it as the state religion, thereby creating a new Daoist theocracy that lasted until 450 CE. The arrival of Buddhism had great influence on the Northern Celestial Masters, bringing monasticism and influencing the diet of practitioners. Art produced in areas dominated by the Northern Celestial Masters also began to show Buddhist influence. When the theocracy collapsed, many Daoists fled to Louguan, which quickly became an important religious center. The Northern Celestial Masters survived as a distinct school at Louguan until the late 7th century CE, when they became integrated into the wider Daoist movement. History Northern Wei (424-450) Kou Qianzhi was a member of Celestial Master family that came from an area near Chang'an. Inspired by the burgeoning Taoist movement in Southern China, Kou retreated to Mount Song in Henan to receive inspiration. On the mountain, as described by the text The History of the Wei Dynasty, he was visited twice by Laozi. In his first visit in 415, Laozi revealed to Kou a text known as the Laojun Yinsong Jiejing (New Code). This text contained precepts designed for a new religious community. In 423, a messenger of Laozi came and offered Kou a new text called the Lutu Zhenjing (Perfect Scripture of Registers and Charts), which is now lost, and appointed him as the new Celestial Master. In 424, Kou took these texts with him to the Wei court. There, he was welcomed by Emperor Taiwu and garnered the support of Cui Hao, the prime minister. Even though Cui Hao was a Confucianist, he greatly admired Kou and was immediately drawn to him. Cui also appreciated Kou's mathematical skills and hoped that he might help him improve his own longevity techniques. They also shared a dream of a 'purified society,' a land where peace and