Meanwhile in the south the Eastern Tsin Dynasty, which represented the legitimate Empire and ruled at Nanking from 317 to 420, was also favourable to Buddhism and Hsiao Wu-Ti, the ninth sovereign of this line, was the first Emperor of China to become a Buddhist.
The times were troubled, but order was gradually being restored. The Eastern Tsin Dynasty had been much disturbed by the struggles of rival princes. These were brought to an end in 420 by a new dynasty known as Liu Sung which reigned in the south some sixty years. The north was divided among six Tartar kingdoms, which all perished before 440 except Wei. Wei then split into an Eastern and a Western kingdom which lasted about a hundred years. In the south, the Liu Sung gave place to three short dynasties, Ch'i, Liang and Ch'ên, until at last the Sui (589-605) united China.
The Liu Sung Emperor Wên-Ti (424-454) was a patron of Confucian learning, but does not appear to have discouraged Buddhism. The Sung annals record that several embassies were sent from India and Ceylon to offer congratulations on the flourishing condition of religion in his dominions, but they also preserve memorials from Chinese officials asking for imperial interference to prevent the multiplication of monasteries and the growing expenditure on superstitious ceremonies. This marks the beginning of the desire to curb Buddhism by restrictive legislation which the official class displayed so prominently and persistently in subsequent centuries. A similar reaction seems to have been felt in Wei, where the influential statesman Ts'ui Hao[623], a votary of Taoism, conducted an anti-Buddhist campaign. He was helped in this crusade by the discovery of arms in a monastery at Ch'ang-an. The monks were accused of treason and debauchery and in 446 Toba Tao[624], the sovereign of Wei, issued an edict ordering the destruction of Buddhist temples and sacred books as well as the execution of all priests. The Crown Prince, who was a Buddhist, was able to save many lives, but no monasteries or temples were left standing. The persecution, however, was of short duration. Toba Tao was assassinated and almost the first act of his successor was to re-establish Buddhism and allow his subjects to become monks. From this period date the sculptured grottoes of Yün-Kang in northern Shan-si which are probably the oldest specimens of Buddhist art in China. In 471 another ruler of Wei, Toba Hung, had a gigantic image of Buddha constructed and subsequently abdicated in order to devote himself to Buddhist studies. His successor marks a reaction, for he was an ardent Confucianist who changed the family name to Yüan and tried to introduce the Chinese language and dress. But the tide of Buddhism was too strong. It secured the favour of the next Emperor in whose time there are said to have been 13,000 temples in Wei.