As per Hindu legend, once Vishnu wanted to test the devotion of the god Brahma. He raised as a Kadamba tree in the place; Brahma worshipped him with thirumanjanam (ablution). The water from the ablution filled a tank nearby, which came to be known as Kathamba Theertham. Vishnu was satisfied with the devotion of Brahma and gave a boon to Brahma to have a shrine in this place. Shiva wanted to expiate the sin for decapitating a head of Brahma and went on a pilgrimage. Here, Vishnu requested his consort Lakshmi to give alms to Shiva. Shiva's grail was filled by the alms and Lakshmi came to be known as Poornavalli Thayar (the one who filled the grail).