This paper explores the relationship between the Chinese imperial state and local society through an examination of sacred spaces and rituals of the god King Li among the Budai people of Heng Village in Jinlong Township on the Sino-Vietnamese border in Guangxi. The Jade Emperor is the highest god in the religious system of the Budai; it is on his authority that King Li is put in charge of local religious specialists. King Li is worshiped as a local patron deity. Budai villagers visit his temple on traditional festivals to make offerings. A communal ritual known as Qiuwu is performed at the temple on the fourteenth day of the Chinese Lunar New Year, to pray for a good harvest and prosperity. In this ritual, local religious specialists, Fogong, journey to visit the gods and celestial bureaucratic offices to offer them gifts. The Budai villagers' concepts of religious space thus reflect the Chinese imperial bureaucratic system. Though the "departments" and the hierarchy of the ritual space of the Budai are similar to the traditional Chinese imperial bureaucratic system, there are still locally distinctive characteristics. The Budai's legends of King Li and their religious system is an expression of the complex historical relationship of conquest and submission between the central government and the local.