King Dilipa was childless. The royal lineage - the great Raghu Vamsha - would end with him. He came to the sage Vasishtha to ask for guidance.
Vasishtha said: "Once, when you passed the celestial wish-fulfilling cow Kamadhenu on a road, you did not stop to honor her. She cursed your line with childlessness. The only remedy is to serve her daughter Nandini."
Dilipa and his wife Sudakshina were given charge of Nandini, Kamadhenu's divine calf. Every day Dilipa walked behind Nandini as she grazed, protecting her, serving her. His majesty meant nothing - he was a cowherd now.
One day a lion appeared and seized Nandini. The lion said it was Shiva's appointed guardian of the forest, that it had the right to this meal.
Dilipa did not flee. He did not use his weapons. He said: "I am her protector. If she must be eaten, eat me first. My job is to put myself between harm and her. That is what I agreed to."
The lion began to eat him. No lion touched him - the entire vision dissolved. It was a test. Nandini herself appeared and said: "You have passed. Ask for whatever you wish."
Dilipa said only: "Give me a son worthy of continuing this dynasty." Nandini granted it. That son was Raghu, the most famous king of the solar line.