Religion in the Song dynasty (960–1279) was primarily composed of three institutional religions: Confucianism, Taoism, and Buddhism, in addition to Chinese folk religion. The Song period saw the rise of Zhengyi Taoism as a state sponsored religion and a Confucian response to Taoism and Buddhism in the form of Neo-Confucianism. While Neo-Confucianism was initially treated as a heterodox teaching and proscribed, it later became the mainstream elite philosophy and the state orthodoxy in 1241.