The story of Thirumandhamkunnu
According to the temple's own account, King Mandhata of the Surya dynasty gave up his kingdom to meditate on Lord Shiva. Shiva gave him the sacred Shiva linga from Kailash that Parvati herself used to worship. Mandhata carried it down on his head and set it on the ground on this hill, where it became fixed.
Parvati was grieved to lose the linga and sent Bhadrakali with an army of bhoothas to bring it back. They could not climb the hill because of the brilliance of the linga and fought from its foot, while Mandhata's ascetics threw attanga nuts that turned into arrows. The battle is said to have lasted fifteen days, and the custom of Attangayeru on the first of Thulam recalls it.
In the struggle the linga split in two. Parvati then said that she could not be parted from it and entered the linga to remain there for ever. That spot is the Sreemoolasthanam, where the split linga still lies below the peedam. Infant Ganapathy, who had come with Parvati, is installed there too, and it is to this Unni Ganapathy that the Mangalya Puja is offered.
At Parvati's wish Bhadrakali was installed near her, facing north, with the Saptamatrukkal, Veerabhadran and Ganapathy. This shrine is the Mathrusala. The Pooram, the Pattu and the other festivals are for this goddess.
Mandhata handed the temple's manual of worship to two Brahmin families, Kattillamuttam and Panthalakode, and retired to the forest of Kukshipparakkad nearby. The temple's tantri is still a descendant of one of these families. The Valluvanad chavers, the warriors who set out for the Mamankam festival at Thirunavaya, are remembered to have started from this temple, and a memorial stands at its main entrance.

