This paper makes use of historical epigraphic materials that the author has collected in Putian to discuss how Tang-Song Buddhism, Song neo-Confucianism, and the lishe (territorial altar) system of Ming- Qing affected local lineage and popular religious organization. The basic argument is that traditional social organization was based on Buddhism and lineage organization. In Tang-Song, Buddhism was extremely influential in local society, and powerful hereditary families attached themselves to Buddhist monasteries. From Song to Yuan, ancestral halls were gradually separated off from the monastic system, and lineage organization grew relatively more independent. In the Ming, the state lishe system intertwined with the system of local popular temples, leading to the development of social alliances that transcended the lineage. In the development of lineage and popular religious organizations, Buddhism, neo-Confucianism and state administrative systems profoundly shaped local organizations like lineage and temple systems. Their impact was not direct, but rather was mediated by local socio-cultural traditions. In this process, the literati stratum played a critical role.