In Dwapara Yuga, an elephant named “Supretheeka” was killed in the war fought between Pandavas and Kauravas which resulted in the North-Eastern direction losing its weight. This feared the sages who decided to seek the help of Lord Parameshwara.
When sages addressed the issue to Lord Parameshwara, he replied them, that the Vindhyachal Hills has grown oversized due to its positive attitude with the other hills, thus causing danger to the movement of sun. So he had decided to send Agasthya Muni(sage) to overcome its egotism who is also considered to be of more weight due to the influence of penance. So when he lands in the region with low mass, it will gain some weight thus balancing the land and bring good fortunes to each and everyone.
When Lord Shiva asked Agasthya Muni (Sage) to take up this task, Sage Agasthya sorrowfully pleaded to Lord Shiva saying - “If I go there, how can I perform “Ganga bath” and your worship. Please send others to get this work done.” On hearing this Shiva said “Oh Sage.. Now you leave… Leave behind all the grief. Worship me residing in that region. I will appear before you when you worship me with devotion.”
On agreeing to the words of Lord Shiva, Agasthya started his journey to that region. Agasthya Sage was successful to lower down the Vindhya hills and continued his journey towards south along the sea shore, he came to Shree Nagapura Kshetra. The day he arrived to this place, it was Monday as per Utterayana, Jyesta Bahula Amavasya with Adhraa Nakshatra.
At this place, as soon as he placed down his “Kamandala”, there formed a “Teertha” (Pond) which came to be known as “Kamandala Teertha”. Thereafter, he performed Sandhya Vandana and other daily rituals. He then installed a Shiva Linga in the North-Eastern direction creating a “Agasthya Teertha”, a maha Teertha nearby. After performing bath in this Teertha, he brought the water in the Swarna Kalasha and poured it on the Linga as abhisheka. He then worshipped the Linga with flower, offered “Naivedhya” and started meditating in front of it. Lord Shiva, who was residing in the heart of Sage Agasthya, appeared to the sage. Upon seeing Lord Shiva, he performed “Sastanga Namaskara”. When Lord Shiva asked the sage to seek blessings from him, the sage asked Lord Shiva to reside in the Linga in the form of Shanmuka, Gomati, Parvati, Yogini which he had installed near the sea shore.
Sage Agasthya asked Lord Shiva - “Let this Linga installed by me get famous with the name “Agastheswara”. Those who worship this Linga will be blessed with good fortunes,” to which Lord Shiva agreed. He then continued saying, Shanmuka and Ganesha along with Goddess Parvathi will reside in the South-Eastern direction for the good will of the Universe. “Vyshali” will be residing in the direction.