Brahma and Shiva both had originally five heads. One day Brahma went to Kailasah. Parvathi could not recognise Brahma; she was confused and concluded it was her husband Shiva. Parvathi started to perform padha pooja (ablution of feet, considered an act of respect). Brahma knew this fact, but he remained silent. On seeing this, Shiva understood that Parvathi had no intention. Parvathi was unaware that the one who stood before her was not Her lord, but it was Brahma. Enraged in anger, Shiva plucked the Brahma's fifth head, which resulted in Brahmahatthi dosham (sin resulted due to murder of Brahmin). The fifth head of Brahma stuck in Shiva's hand. Shiva wandered and visited temples to be relieved from the curse. To find salvation from the curse, Shiva went around the world on a pilgrimage begging for food, with Brahmma's skull as the begging vessel. Every time someone filled the vessel with food, it vanished immediately, to Shiva's horror. At Uthamar Koil, Goddess Lakshmi filled the vessel with food, thus ending Shiva's hunger. However, to Shiva's dismay, Brahma's skull still lay fixed on his hand. He was partly absolved of the sin at Bitchandar Koil. Vishnu instructed Shiva to worship Him (Vishnu) at Thirukandiyur after a bath in the temple tank. Shiva went to Thirukandiyur and did accordingly and was absolved of the sin. The temple tank, since then, has come to be known as kapala theertham.