Once on the way back to earth after fighting a war on the side of the gods, King Dilipa failed to notice the divine cow Kamadhenu on his way and passed without paying his respects to her. Thereby he incurred the anger of the cow, who cursed the king to go childless. To negate the ill-effects of the curse, the king was advised to worship the divine cow Nandini who was the daughter of Kamadhenu, and thereby to earn her goodwill. The king faithfully served Nandini for twenty-one days. He slept where the cow slept, ate when the cow ate and washed the cow and took very good care of it. On the twenty-second day, when the cow was grazing in the field, a lion appeared suddenly and pounced to eat Nandini. The king tried to kill the lion but could not, because the lion happened to be a servant of Lord Shiva and he cast a spell on King Dileepa that made him motionless. The king wanted to protect the cow but could not do anything but speak. He begged the lion to spare the cow and eat him instead and bowed before the lion. Seeing that the king was willing to sacrifice himself to save her, the cow was very much pleased. She revealed that the incident was actually a trick which she had played on the king to test his faithfulness. Nandini removed the curse of her mother and the King very soon begat a son, who came to be called as Raghu meaning one who was learned in the shastras and who vanquished the enemies in war.