Seven divine maathrikes who had been living their immortal lives in Varanasi came floating southward a great many ages ago and paused over Hassan. In those days when the western ghats were all jungle, and Hassan was a small habitation a short distance from the hills, on jungly plains. What lay below bewitched the divine ladies, and they landed softly in town. Seeing how it was beautiful up close even, they decided they must live forever in the place. For the divine, forever is forever, and the maathrikes live in Hassan even now.
Of the seven, three maathrikes (divine mothers) chose for their new home an anthill. They were Vaishnavi, Kumari, and Maheshwari. Three others chose three wells in a tank a short distance from the anthill, which tank came to be called Devigere, the "pool of goddesses." These were Varaahi, Indrani and Chamundi. The seventh among them, Brahmi Devi, went some distance south-west of the other six and settled on top of a short hill. A village grew around it, and took one of her several names, Kenchamma, and became Kenchammana Hosakote, or Kenchamma's new fort. Why did they call her Kenchamma? Or Kenchamba? Because of a blush on her cheeks? Because of red in her hair? Or the colour of the blood of the rakshasa with whom she fought a long bloody battle and killed him? And, coming back to Hassan, who among the three—Vaishnavi, Kaumaari, Maheshwari—is Hasanamba? I'm going to find out on my next visit, later this month.
A story on the Internet says Malik Kafur, Alauddin Khilji's general who pillaged the Dwarasamudra (Halebid) Temple of the Hoysalas thirty kilometres from the town-centre of modern Hassan, was resting his troops somewhere in Hassan. His men cooked meat and consumed it right by the anthills where the devis had by now been long in residence. This and so angered the devis that Kafur's troops began to drop dead, a man at a time. A stricken Kafur rushed to the poojaris of the devis but they couldn't help him, the affront to the devis being so terrible. But Hasanamba, who is goddess to all men and forgives every penitent, appeared to Kafur in a dream and suggested he build a temple to her as penitence. Which he did, employing local expertise, and earned forgiveness, and went on to further conquests on the peninsula.
(This account needs adjustment with another version, that Krishnappa Nayaka, a palegaar (chieftain) in the twelfth century, was who really built the temple. Maybe the one improved what another had built. Maybe not. Does it matter, so long as the stories live, and mutate, and get better all the time?)
Once the temple was ready, the devi ordered that it be opened for darshan once in a year only, for a few days during the lunar month of Ashwayuj. She made the temple powerful with miracles: Three female faces formed over the anthill in the core of the temple, and the anthill in it became the chief deity. A big round red chandan grew on the foreheads of the devis, which the priests scrape out the day they close the temple for the year. When the temple reopens the* chandan* has grown back on their brow. The nandā-deepa, (ghee-fueled lamp) burns all year for the duration the temple doors are shut, the ghee never depleting. And the anna-naivedya (the rice offering) offered to the devi at the time of closing the temple stays warm and unspoiled.
For centuries, devotees of Hasanamba have been arriving in Hassan in the hundreds of thousands, to say thanks for prayers answered, to beg for blessings for new deeds and new problems.