In the time of Kulasegara-Pandyan, who ruled in Manavur, a merchant named Tanan-shayen, in the course of his journeys on commercial business was benighted in a forest of Kadamba trees; and being unable to proceed further took up his abode at the foot of one of them. He was surprised at the sight of an unusual splandour; and going to look, was faoured by the God with the view, because he had been very virtuous in a former birth. As it was Monday, the gods were performing homage and anointing the
image, as though it had been the night of Siva. The merchant bathed in the tank and worshipped; when the gods had disappeared, he saw the stone image only; and next day went and told the King aforesaid what he had seen. The God also appeared to the King the following night by a vision, in the form of a religious ascetic, and commanded him to build a temple in the aforesaid wilderness. The king finding the vision and the statement of the merchant to accord, went to the place and had the forest cleared. Being uncertain how to build the temple and town, he had another vision which the God appeared and gave instruction, in obedience to which, workmen were employed, having a king's street, Brahmin's street and also choultries, mandapams, tanks and the like. The whole being splendidly finished, with a palace also for the king on the North-East quarter, an embarrassment arose as to how these numerous buildings could all be purified preparatory to residence at once, so as to ensure an entrance on an auspicious day; the difficulty the God Siva was pleased to remove by causing Ganga, abiding in the hair on his head to pour forth copious streams on the whole place: and the god was pleased to give it the name of Mathura (or sweetness), and he then disappeared. The King placed guards at the four cardinal points of the city, who were all four of them deities. Afterwards a son was born to him, named Malaya-Dhwajan, who on the King's death succeeded to the throne.