In addition to his many other roles, the emperor acted as the highest priest in the land who made sacrifices to Heaven, the main deities known as the Five Powers, and the spirits (shen 神) of mountains and rivers. It was believed that the three realms of Heaven, Earth, and Mankind were linked by natural cycles of yin and yang and the five phases. If the emperor did not behave according to proper ritual, ethics, and morals, he could disrupt the fine balance of these cosmological cycles and cause calamities such as earthquakes, floods, droughts, epidemics, and swarms of locusts.