Druids held a high place in Celtic society. While Celtic kings held secular power, druids ruled all functions of religious life, acting as priests, judges, and seers. The druids were the repository of sacred lore and the intermediaries between the gods and man. Besides presiding over religious ceremonies and sacrifices, the druids were the guardians of genealogies, complex legal codes, healing lore, and mythology. The druids also acted as astronomers, keeping the calendars by which the timing of festivals and auspicious days were determined. Upon the death of a king, druid seers conducted ritual divination to determine the next ruler.