Whereas the metropolitan, text-based schools of Chinese Buddhism were devastated by the mid-ninth century purge, rural Chan communities flourished, resulting in the so-called “five houses” or Linji, Caodong, Fayan, Yunmen and Guiyang lineages. Collections of “encounter dialogues” between Chan masters and their students began circulating and resonated well with Chinese literati. With the collapse of the Tang dynasty (618–907) and the founding of the Song (960–1279), Chan fortunes continued to swell as a “homegrown” form of Chinese Buddhism that fit well into the literati mission of using ancestral cultural traditions (guwen) to craft a new imperial identity for China. By the twelfth century, Chan had both religious and political prestige and the vast majority of public monasteries supported by the Song court were devoted to the practice of Chan (see Welter 2006).