The king faithfully served Kamadhenu 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 faithfullness. 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.