Hindu God Sri Ram was born in the Raghuvamsa lineage. The dynasty is also known as Ikshvaku Vamsa. The Raghuvamsa lineage traces its origin to Surya, the Hindu sun god. An interesting story in Hindu scriptures mentions about the origin of the Raghuvamsa. Khatvanga was one of the rulers of the solar dynasty. He had a son named Dileepa. In due course of time, Khatvanga decided it was time for him to bid adieu to the materialistic world. He installed the brilliant Dileepa as the next king.
Dileepa did not disappoint his father and made his kingdom one of the most powerful. The people were happy and content. But Dileepa was an unhappy man as he did not have a son to continue the dynasty.
Dileepa and his wife Sudakshina approached Sage Vasishta for a solution.
Vasishta then went into deep meditation and found that King Dileepa had acquired a curse. Once he had ignored Kamadhenu, the divine cow. Kamadhenu could not tolerate this ignorance as the divine cow thought when the king fails in his duty to honor the cow in his kingdom, the subjects will follow suit and soon there will Adharma in the country. The divine cow cursed him that he will not have a son to succeed him.
To overcome the curse, Vasishta asked the king to perform Dhenu Vrata, the worship of cow. Dileepa and his wife immediately started the cow worship by offering worship to Nandini, the divine cow in the ashram of Vasishta.
Dileepa then regularly took care of Nandini. Once a lion followed Nandini with the intention of killing it and satisfying its hunger. Dileepa requested the lion to spare Nandini and instead have him as its meal. The lion appreciated the dharma of the king and left the place sparing Nandini and the king.
Nandini moved by the self sacrifice of the king released him from the curse.
Soon Dileepa and his wife Sudakshina had a son. They named him Raghu and the great lineage of Raghuvamsa in which Sri Rama was born began with Raghu becoming the ruler of the kingdom.
Raghu had a son named Aja. His son was Dasharatha. Sri Ram was born as the son of Dasharatha.