As per Hindu legend, once there was an argument between Saraswathi, the consort of Brahma and Lakshmi on superiority. They went to Indra, the king of celestial deities. Indra judged Lakshmi as superior and not satisfied with his argument, Saraswathi went to her husband, Brahma.
He also chose Lakshmi to be the superior one. Saraswathi was unhappy with the decision and decided to stay away from Brahma. Brahma did a severe penance praying to Vishnu and did an Aswametha Yagna. Saraswathi was still angry that the yagna, which usually is done along with consorts was done alone by Brahma.
She tried to disrupt the penance, but Vishnu interfered with his serpent Adisesha. Saraswathi, on seeing Vishnu in her path, accepted her defeat and subsided in the form of river Vegavathi. As Vishnu interfered the path of the river, it was termed Vegavani, then as Vegannai and gradually corrupted to Vekka. The presiding deity thus got one of his names, Vegasetu.
As per historian Nagaswamy, the temple was called Vehha meaning Vishnu leaning as a slanted slope, which gradually became vekka.
Once sage Bhargava had a son through Kanakangi, a celestial dancer. The boy was stillborn and was not fully developed during his birth. kanakangi left his son under bushes and left to celestial world. It is believed that the child was a divine incarnation of one of Vishnu's weapons, the Chakra.
By the grace of Vishnu and Lakshmi, the baby became alright and began to cry. A childless farmer couple who were passing by took up the child, named him Sivavakkiyar and started rearing him. Once the boy reached adulthood, he was sceptical about choosing between Saivism and Vaishnavism. He was defeated in arguments by Pey Azhwar. He became a devotee of Vaishnavism and the disciple of Pey Azhwar. Sivavakkiyar was also called Bhakthisarar and later as Thirumalisai Alvar.
Thirumalisai had a disciple by name Kanikkannan. He also had an old lady serving him - Thirumalisai prayed to the presiding deity of the temple and by the grace of Bhujangasayana Perumal, the old lady became a beautiful young lady. The Pallava king who was ruling the region at that time got attracted by the lady and married her.
With time while the king was growing older, the lady remained young. He called up Kanikannan and ordered to sing praise of him so that he also turned young. When he refused, the king ordered Kanikannan to be banished out of the country. Kanikannan explained this to his master Thirumalisai, who prayed to Bhujangasayana Perumal.
When the king heard this, he ordered the three to be sent of the country, which they obliged. When the three left Kanchipuram, it was engulfed in darkness. Realising his sin, the king worshipped Bhujangasayana Perumal to return along with his two devotees. Since the presiding deity obliged to his devotees wishes, he is called Yathothkari Perumal. Yathothka means as requested and kari denotes the person who accomplishes the task.
One of the alwars, poet saints of 7-10th century, Poigai Alvar was born at this temple.
Shrine of Poigai Azhwar in the temple
The temple is considered one of three oldest Vishnu temples in Kanchipuram, the other two being Ulagalantha Perumal Temple and Pandava Thoothar Perumal Temple. The temple has 12 inscriptions from the Chola and Vijayanagar period.
The temple is originally believed to be built during the period of Pallavas. The temple has a set of inscriptions associated with Cholas. A record of the Chola king, Parantaka I (907–950 CE) indicating gift of 367 kalanju of gold to the temple by an individual
The south wall of the central shrine of the temple has inscriptions from the period Rajendra Chola I (1012–44) indicating gifts of land measuring to one tuni of land and 127 kalanju of gold to the temple. The inscriptions on the base of the eastern wall of the central shrine from the period of Kulothunga Chola I (1070–1120 CE) indicating gift for lighting lamps of the temple. The southern side inscriptions of the temple from the period of Kulothunga Chola III (1178–1218 CE) indicates a gift of village to feed 32 Brahmins.
The inscriptions also detail the float festival and the summer festival celebrated in the temple.
The temple is maintained and administered by the Hindu Religious and Endowment Board of the Government of Tamil Nadu.
The temple was built 8th century A.D. by Pallavas, Medieval Cholas and Vijayanagar kings. The Azhwars have sung praise on the different forms of Yathothkari Perumal.
Legend 1:
Brahma’s Aswamedha Yagam and Goddess Sarswathi’s anger at being ignored by her husband who was busy with the fire ritual. Brahma needed Saraswathi, his wife, to be by his side to perform the ritual. So, he sent his son Vashistan to make Saraswathi return to Brahma. Saraswathi refused and Brahma started the Yagam by keeping Savithri and his other wives next to him. The Asuraas (demons) wanted to stop this fire-ritual and so went to Saraswathi and carried tales that made her angry.
Saraswathi took the form of Vegavathi River and began to flow in a south direction and across the area where the Yagam was being performed so as to destroy it. Sriman Narayanan decided to stop Vegavathi River to protect the Yagam. So, he stopped the river’s flow by lying across the river on his serpent Adiseshan. This is why this Perumal is also called Vega Sethu.
This became Vegavanai, then Vekkanai and finally became Vekka—Thiruvekka. When on Brahma’s request Lord Vishnu came in a tearing hurry to block River Vega Vathi (Saraswathi), Perumal on his return to the sanctum is said to have slept in the opposite direction.
Legend 2:
Thirumizhisai alwar was living in Kanchipuram, an old lady used to clean his house daily and do some small favours for him. He was very happy by her favours, and Alwar changed her from old lady to a beautiful woman. Wondering at her beauty, the king married the woman and she became the queen. On hearing this secret, the king was eager to meet Thirumizhisai Alwar. Kani Kannan was a great follower of the Thirumazhisai Alwar.
So, the king called up Kani Kannan and told him that Thirumizhiasi Alwar should come and sing a song praising him. Kani Kannan immediately replied that, all the poems sung by Thirumizhisai Alwar belonged to the lord, Srivaikundanatha and it is impossible to come to the palace.
Due to this, king got angry and ordered Kani Kannan to get out of Kanchi. Then Kani kannan went to Thirumizhisai Alwar and explained all the happenings in the palace. Then, he decided to get out of the Kanchi. While they were going, he sang a song on the Yadhothakari Perumal saying that, as Kani Kannan was leaving Kanchipuram, he was also going along with him and Alwar asked the lord to get up from his Aadhisheshan(the holy snake), which is the bed for him, to roll it and quit from Kanchi. At that time, the lord also got from the Kanchi following Alwar and Kani Kannan.
On hearing this, the king and all the people of the kanchi begged Kani Kannan to return back to the Kanchipuram. After this, Kani Kannan returned back to the Kanchipuram along with the Thirumizhisai Alwar. Alwar sang a song saying that Kani Kannan had returned back to Kanchi and he wanted Perumal to go and sleep in his Aadhiseshan back in the temple. On hearing this, Shriman Narayana comes back to Thiruvekka temple and gives his sayana seva. As the lord obeyed the words, he came to be known as “Sonna Vannam seitha perumal”.