the Tao. The first organized form of Taoism, the Tianshi (Celestial Masters') school (later known as Zhengyi school), developed from the Five Pecks of Rice movement at the end of the 2nd century CE; the latter had been founded by Zhang Daoling, who claimed that Laozi appeared to him in the year 142. The Tianshi school was officially recognized by ruler Cao Cao in 215, legitimizing Cao Cao's rise to power in return. Laozi received imperial recognition as a divinity in the mid-2nd century BCE. Taoism, in form of the Shangqing School, gained official status in China again during the Tang dynasty (618–907), whose emperors claimed Laozi as their relative. The Shangqing movement, however, had developed much earlier, in the 4th century, on the basis of a series of revelations by gods and spirits to a certain Yang Xi in the years between 364 and 370. Qin and Han dynasties In 221 BC, the state of Qin succeeded in conquering the other six states, creating the first imperial dynasty of China for the first time. Following the death of the emperor Qin Shi Huang, the Qin dynasty collapsed and control was taken over by the Han dynasty in 206 BC. In 220 AD, the Han empire collapsed into the Three Kingdoms. The series of trade routes known as Silk Road began during the Han dynasty. Qin Shi Huang ruled the unified China directly with absolute power. In contrast to the decentralized and feudal rule of earlier dynasties the Qin set up a number of 'commanderries' around the country which answered directly to the emperor. Nationwide the political philosophy of Legalism was used as a means of the statecraft and writings promoting rival ideas such as Confucianism were prohibited or controlled. In his reign China created the first continuous Great Wall with the use of forced labor and Invasions were launched southward to annex Vietnam. Eventually, rebels rose against the Qin's brutal reign and fought civil wars for control of China. Ultimately the Han dynasty arose and ruled China for over four centuries in what accounted for a long period in prosperity, with a brief interruption by the Xin dynasty. The Han dynasty fought constant wars with nomadic Xiongnu for centuries before finally dissolving the tribe. The Han dynasty played a great role in developing the Silk Road which would transfer wealth and ideas across Eurasia for millennia, and also invented