The focus of this article is the representation of noblewomen as goddesses in the Erhai Lake region during the Nanzhao and Dali kingdoms (CE 752–1254). Both kingdoms used Buddhist legend and ritual to elevate female characters from local legend into goddesses. Noblewomen played a key role in the formation of the local aristocratic society, for it was marriage alliances involving noblewomen that initially linked different social groups together. Many local legends tell of the marriage of queens to the Yellow Dragon, thereby transferring the mysterious power of the Yellow Dragon to the kingdom. Legends of marriages between princesses and Buddhist monks similarly transfer the ritual power of Buddhism to aristocratic groups. The genealogical connections thus created through noblewomen had several consequences. First, through their marriage to outsiders, noblewomen extended the power of the ruling group. Second, noblewomen played a dual role as the basis for alliances between different social groups and as the reproducers of social relations. They could thus be seen as the female ancestresses of the aristocratic formations. Third, the sutras and rituals provided by the Buddhist texts of the Dali kingdom confirmed the recognition of such female ancestors as goddesses. Third, noblewomen legitimized and yet circumscribed the religious powers of the patrilineages. Fourth, female ancestors played an important role both for the expansion of royal power through the extension backwards of patrilineal ties, and for the maintenance of social order once royal authority had been stabilized.