From the 9th until the 12th centuries, the Khmer kings worshiped Shiva, the third god in the Hindu triumvirate. This deity created and protects the universe. In honor of Shiva, King Udayadityavarman II commissioned the building of the Baphuon Temple. When this three-tier symbolic mountain was completed in the mid-11th century, it was considered to be one of the grandest temples in the Khmer Empire.