The temples are thought to have been built to honor the deified ancestors of kings. This is a kind of ancestor worship, interpreted in Hindu terms. Living kings, courtiers, and others in ancient days would come to these shrines to worship these ancestors and receive boons from them.The royal ancestors were thus lodged close to the god of the mountain, who was identified with Shiva, and who had ultimate power over the land.The deified royal ancestors could serve as intercessors (in the middle) between the mountain deities and the living people of the land. The design of these temples, like other temples in ancient Java, resembled miniature mountains, like the mythical Mount Sumeru of Hindu-Buddhist mythology. In this way, rituals were performed that honored the mountain, but in an externally Hindu form.Following in the tradition of worshiping Sanskritized mountain gods, the Shailendra kings of central Java sponsored the construction of the huge shrine known as Bodobudur in around 800 CE.The Shailendra had favored Mahayana Buddhism, and so they patronized various Mahayana religious institutions.Borobodur, too, is a Mahayana shrine.It is thought that Borobudur was built like giant mandala or yantra (religious diagram).If we look at the design of this monument from above, we can see the geometrical configuration of a mandala.But at the same time is was a kind of artificial mountain, matching the Javanese reverence for mountains, and also conforming to the magical mountain (Sumeru) of Buddhist cosmology.