The initial design and construction of the temple took place in the first half of the 12th century, during the reign of Suryavarman II (ruled 1113 - c. 1150). Dedicated to Vishnu, it was built as the king's state temple and capital city. As neither the foundation stela nor any contemporary inscriptions referring to the temple have been found, its original name is unknown, but it may have been known as Varah Vishnu-lok after the presiding deity. Work seems to have ended shortly after the king's death, leaving some of the bas-relief decoration unfinished. The term Vrah Viṣṇuloka or Parama Viṣṇuloka literally means The king who has gone to the supreme world of Vishnu, which refer to Suryavarman II posthumously and intend to venerate his glory and memory.