As per the legend, there was a nishada king named Nila who ruled over Mahishmati. King Nila had a daughter who was exceedingly beautiful. So much so that Agni (lord of fire) fell in love with her which was reciprocated. The princess always used to stay near the sacred fire of her father, causing it to blaze up with vigour. And king Nila's sacred fire, even if fanned, would not blaze until agitated by the gentle breath of her lips. Agni, assuming the form of a Brahman starts courting with the princess for long. But, one day the couple was discovered by the king, who became furious. Nila thereupon ordered the Brahman to be punished according to law. At this the illustrious deity flamed up in wrath and beholding the terrible flame, the king felt terrified and bent his head low on the ground. King hails Lord Agni and says he cannot punish a god who is responsible for the origin of Vedas, source of all Knowledge and Dharma. Pacified Agni then grants a boon to Nishada, and the King requests for the protection of his kingdom from any invasions. Agni swears to protect his kingdom on the condition that the king should sanctify pleasure out of pure love a legitimate action in his kingdom.