Story behind SivalayaOttam
There is an interesting story behind Sivalayaottam. One which happened in the Mahabharath era.
It all started when the Pandavas decided to arrange a Yaga in their sacred yard. Dharmaputra, being the eldest, invited all the Saints and Rishis of the country including the Siva devotee sage Vyakrapada. But he ignored the invitation. Bhima learning this felt humiliated and he consulted Lord Krishna for a solution. Lord Krishna ordered Bhima to bring Vyakrapada to the yaga by himself. Not knowing of Vyakrapada's real power, Bhima thought this was an easy task. When he visited Vyakrapada's ashram, Bhima saw him outside meditating. Bhima shouted, but the sage didn't move. Bhima carried on with him disturbance until he felt burning. Bhima found out that this was Vyakrapada's super power. Bhima fled to Lord Krishna. Lord Krishna said that Bhima should solve this problem but he will not hesitate to help and then Krishna gave Bhima 12 Sivalingas and told him to move on.
Bhima once again entered Vyakrapada's ashram and started disturbing his meditation. But this time, Vyakrapada became more violent and decided to chase Bhima down. Bhima started running. When he was exhausted he put down a Sivalinga. Being a Sivadevotee, Vyakrapada forgot about Bhima and started doing puja on the Sivalinga. Bhima used this time to catch up his breath. When Vyakrapada finished his prayers, Bhima started running. When he was exhausted again, he put down the second Sivalinga and Vyakrapada started to do puja on it again. This carried out until Bhima ran out of Sivalinga and Vyakrapada was just inches away from killing him. But just then, Hari and Haran came as one. It was both Vishnu and Siva. At that moment Bhima realised that his God Vishnu is Siva and Vyakrapada realisedthat Siva is Vishnu. They both understood that all Gods are one. Vyakrapada forgives Bhima and Vishnu and attended the yaga and Bhima forgives Vyakrapada for disturbing him when he was worshiping Siva.
Legends says that the Sivalingas present at those 12 temples are the ones put down by Bhima. Thats not all, near the 12th temple, there is a Vishnu temple indicating his appearance with Siva at the last moment.