This article explores the role that local elites played in the development of the Mazu cult, a local goddess cult in Putian district in late imperial China. I argue that local elites were central in the promotion and transmission of the cult. Through compiling and writing key Confucian texts featuring Mazu, they reshaped, manipulated, and represented certain aspects of her cult in accordance with their interests. As a result of the activities of local elites, Mazu became associated with the Lin lineage, an influential local lineage. In this manner, Mazu came to be seen as an expression of the lineage&rsquo / s authority, as well as an imperial protector embodying local loyalty to the state and a daughter who was the paradigm filial piety. In addition to the literary production, local elites, in particular the descendants from the Lin lineage, established an ancestral hall of Lin in the port of Xianliang dedicated to Mazu, further sanctioning divinely the local elites&rsquo / authority and privilege in the community. I conclude that the locally promoted version of goddess worship operated at the intersection of state interests, Confucian ideology, the agency of local elites, and the dynamics of popular religiosity.