Emperor Dasharatha had a trustworthy prime minister named Sumantra and eight educated, scholarly ministers who helped him with government affairs. The court also included royal priests like Vashishtha, Vamadeva, and Javali, who advised the emperor. Despite his wealth and splendor, as well as three beautiful queens—Kaushalya, Sumitra, and Kaikeyi—Emperor Dasharatha was unhappy because he had no children to continue his dynasty. After discussing this with his ministers and royal priests, they proposed that he perform a Putrakameshti Yagya in order to bear a child.
Sumantra suggested inviting Sage Shringi to conduct the yagya, which took place on the Sarayu riverbank in Ayodhya. During the ritual, the gods approached Lord Vishnu and pleaded, "O Lord, the demons and their king, Ravana, have become exceedingly powerful and threaten the existence of gods and humans alike. Emperor Dasharatha is currently conducting a yagya to beget children. Please be born as four sons to Emperor Dasharatha and his queens to vanquish the demons."
Vishnu graciously agreed. At his behest, the fire god, Agni, appeared in the sacrificial fire with a pudding plate. He addressed Dasharatha saying, "Emperor, the gods have sent me with this plate of pudding. Give it to your queens; after they consume it, they will bear four great sons."
The emperor gave half of the sacred pudding to his eldest queen, Kaushalya. He then divided the remaining half into two equal portions, offering one to Sumitra and the other to Kaikeyi. Since Kaikeyi received her share last, she voiced her displeasure to the emperor.
At that moment, as commanded by Lord Shiva, the eagle Garuda swooped down and snatched the pudding from Kaikeyi's hands. He delivered it into the open palms of the monkey Anjani, who was praying to Lord Shiva for a son. Anjani believed the pudding to be prasada from the Lord and consumed it. As a result, Anjani gave birth of Hanuman, who would later become a loyal servant of Lord Rama. Feeling sorry for Kaikeyi, who had lost her share, Kaushalya gave Kaikeyi some of her pudding and also gave Sumitra a second helping.
The queens soon have birth to four handsome boys. Kaushalya's son was named Rama, Kaikeyi's Bharata, and Sumitra's twins were named Lakshmana and Shatrughna. A pompous celebration was held at the palace.
Emperor Dasharatha wanted to train his sons in archery because he himself was an expert archer. He began training the boys and soon they became proficient in archery. After the four princes grew up, the emperor decided it was time for them to receive formal education and, therefore, sent them to Maharshi Vashishtha's ashram. In the tradition of ancient Bharatavarsha, everyone, whether a prince or a poor person, was required to go to a guru's ashram to gain knowledge.