Lady Po Nagar, or Leiou Ye, was the founder of the Cham people according to legends. She originated from a peasant family in the mountains of Khánh Hòa Province. Spirits assisted her when she sailed on a drift piece of sandalwood to China, where she married a Chinese crown prince, the son of the Emperor of China, who she had two children with, and then became Queen of Champa.
When Lady Po Nagar returned to Champa to visit her family, the Prince refused to let her go, but she flung the sandalwood into the ocean, disappeared with her children and reappeared at Nha Trang to her family. When the Chinese prince tried to follow her back to Nha Trang, she was furious, and turned him and his fleet into stone.
Po Nagar is a Cham temple tower founded sometime before 781 and located in the medieval principality of Kauthara, near modern Nha Trang in Vietnam. It is dedicated to Yan Po Nagar, the goddess of the country, who came to be identified with the Hindu goddesses Bhagavati and Mahishasuramardini, and who in Vietnamese is called Thiên Y Thánh Mâu.
A stele dated 781 indicates that the Cham King Satyavarman regained power in the area of "Ha-Ra Bridge", and that he restored the devastated temple. From this inscription can be deduced that the area previously had come under temporary foreign dominion, and that foreign vandals had damaged the already existing temple. Other steles indicate that the temple had contained a mukhalinga decorated with jewelry and resembling an angel's head. Foreign robbers, perhaps from Java, "men living on food more horrible than cadavers, frightful, completely black and gaunt, dreadful and evil as death" had arrived in ships, had stolen the jewelry and had broken the linga. Though the king had chased the robbers out to sea, the treasure had been lost forever. The steles also indicate that the king restored the linga in 784.