During the Han Dynasty, Confucian ideals were the dominant ideology. Near the end of the dynasty, Buddhism entered China, later gaining popularity. Historically, Buddhism alternated between periods of state tolerance (and even patronage) and persecution. In its original form, Buddhism was at odds with the native Chinese religions, especially with the elite, as certain Buddhist values often conflicted with Chinese sensibilities. However, through centuries of assimilation, adaptation, and syncretism, Chinese Buddhism gained an accepted place in the culture. Mahayana would come to be influenced by Confucianism and Taoism, and exerted influence in turn – such as in the form of Neo-Confucianism.