The compound of the Royal Palace is likely to be occupied under the reigns of Suriyavarman I (1002-1010) and Jayavarman VII (1181-c.1220). The residences of the king and those who worked for him were made of wood, which has disintegrated; therefore, only the stone substructure of the Royal Palace remains. The Royal Palace area is delimited by the Terrace of the Leper King and the Terrace of Elephants. Steps from the two terraces lead to the Royal Plaza, which was used by Jayavarman VII for processions, festivals, and ceremonies. Inside the enclosure behind the terraces is the temple of Phimeanakas and the Royal Baths.