Jayavarman VII (1181-c.1220) likely built Preah Khan as his residence during the construction of his capital, Angkor Thom, after the Cham invasion in 1177 AD. According to the foundation stele, the temple was dedicated to Jayavarman VII’s father, Dharanindravarman (1107-1112). The complex was one of Jayavarman VII’s larger projects, and may also have been used as a Buddhist university. Some 97,840 people served the temple, of whom 1,000 were dancers. The Buddhist temple complex is unusual in that it includes Hindu subsidiary temples devoted to Visnu and Shiva.