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). As per another legend, Brahma and Shiva both had originally five heads. Parvati, the wife of Shiva, once got confused and worshipped Brahma, instead of her husband. Shiva got enraged and cut off one of Brahma's heads; the head stuck in Shiva's hand due to Brahma's curse. To atone for the sin, Shiva worshipped Vishnu here; Shiva was fully relieved of the curse after worshipping Vishnu at Hara Saabha Vimocchana Perumal Temple. According to another Hindu legend, the temple is believed to have been constructed by Janaka, the king of Janakapuri and the father of the goddess Sita. Thirumangai Alvar is believed to have resided in the temple to build the surrounding walls of the Srirangam Ranganathaswamy temple. Temple The temple is believed to have been built by the Medieval Cholas of the late 8th century CE, with later contributions from Vijayanagara kings and Madurai Nayaks. During the war between British and French in 1751, the temple acted as an infantry for both the troops. There was no damage done to the temple during the war. A granite wall surrounds the temple, enclosing all its shrines. The temples has images and separate shrines for Purushottamar (Vishnu), Bhikshadanar (Shiva), Brahma and their respective consorts Poornavalli (Lakshmi), Soundaraya Parvati and Saraswati. This is one of the few historical Hindu temples in the world, where the Hindu Trimurti are worshipped along with their consorts in six separate shrines within the same temple complex. The central shrine facing East houses the image of Vishnu, as Purushottamar, in reclining posture with the discus in one hand. The roof or vimana of the central shrine is called Udhyoga Vimana. There are two shrines located to the south east, each housing the image of Poornavalli and Mahalakshmi. The Shiva shrine, located behind Vishnu's,