Phimeanakas is situated within the same area as the royal palace and was likely used as a royal chapel. It is a pyramid typed temple built between late 10th century and early 11th century by King Suryavarman I, but it does not represent the symbolic meaning of Mount Meru. One of the most interesting features of Phimeanakas is its accompanying legend, which relates to the importance of the naga, or divine serpent, in Cambodian history. According to Zhou Daguan, the Chinese diplomat who provided accounts of his visit to Cambodia in the 13th century, the soul of the nine-headed naga, the lord of the earth, took the form of a beautiful woman and waited each night on the summit of the temple for the king. The king had to couple with her each night in order to ensure the prosperity of his kingdom. If the naga princess failed to appear, the death of the king was imminent.