Uthrapathiswaraswamy Temple

Uthrapathiswaraswamy Temple is a Hindu temple in Tiruchenkattankudi in Thiruvarur district in the Tamil Nadu state of India. Though it is dedicated to the Hindu god Shiva, it is more famous for its Ganesha (Ganapati) icons. The main Ganesha shrine depicts him with a human head, instead of the elephant head he is usually depicted with. Vatapi Ganapati, the other Ganesha icon, was installed in a smaller shrine at a later date.
Names and legend.
The Shiva temple was known as Siruthonda Ganapatishvara, named over Siruthondar. The name "Ganapatishvara", which also gives the town his alternate name "Ganapatishvaram", denotes Shiva as "Lord of Ganesha" and alludes to the legend that Ganesha killed a demon called Gajamukhasura and then worshipped his father Shiva here.
According to another legend, A king ruling Rameswaram region prayed to Lord Shiva for child boon and performed a yajna. Through His voice, Lord assured the king that Ambica would be his daughter. When the king set out on hunting, he found four female children, brought up them as his own daughters. When they attained age, king got married them to Lord Shiva. These are the Ambicas in four places – Sarivar Kuzhali in Rameswaram temple, Vaaitha Tirukuzshal Nayaki in Tiruchengattangudi, Karundhar Kuzhali in Tirupugalur and Vandar Kuzhali in Tirumarugal. They also bear the common name Shoolikambal, the ones who help women through pregnancy and delivery. In all these four places Shrines of Ambika are hosted in separate shrines.
Vatapi Ganapati.
The icon of Vatapi Ganapati is currently enshrined in a secondary shrine in the temple complex of Uthrapathiswaraswamy Temple. As per oral tradition, the icon of Vatapi Ganapati was brought booty from the Chalukyan capital of Vatapi (presently known as Badami in northern Karnataka) by Paranjothi, the commander-in-chief of the Pallava king Narasimhavarman I (reign: 630–668 CE), following the conquest of Pallavas over the Chalukyas (642 CE). The icon was placed in Paranjothi's birthplace Tiruchenkattankudi. Later, Paranjothi renounced his violent ways and became a Shaiva monk known as Siruthondar, is venerated as a Nayanar saint today. However, no written records substantiate the oral tradition; the Ganesha icon is missing from list of war booty brought by the Pallava general. The famous "Vatapi Ganapatim" hymn is dedicated to this icon.