After much political disunity and chaos China was finally united under the Sui dynasty (589-618) and Sui emperors allowed Buddhism to thrive in their land. In China Buddhism was widespread by the 6th century and emperors like Yang Jian protected and sponsored Buddhism to gain the support of the masses. However, Confucianism had long been part of Chinese culture before the arrival of the Sui. Emperors like Wen Di supported Buddhism by building temples but kept Confucianism alive by the examination system. Wen Di created schools that were learning centers of the Confucian classics and examinations based on these classics screened men for government positions. Thus the government was still run by Confucian scholars. Daoism, also a popular religion before the arrival of the Sui, had consistent followers but did not prosper like Buddhism due to lack of government endorsement.
During the Tang dynasty (618- 906) the revival of the Silk Road brought many new religions into China but Daoism and Buddhism continued to prosper. Arab merchants brought Islam to China via the Silk Road. In 635 Christians arrived in Xian, the capital of the Tang dynasty and were given permission to create places of worship. However these two religions did not get a mass following. Instead Daoism received the endorsement it failed to receive during the Sui dynasty. Many emperors of the