Srimad Bhagvata Mahapurana: Book 4: Chapter 13: Verses 21-38
Vidura said : How did that pious and high-souled monarch, who was a very storehouse of virtue and devoted to the Brahmanas, get a wicked son, on account of which he had to depart (for the woods), full of grief? And for what offence did the sages, who knew what was right, employ a curse against a sovereign who had taken a vow of punishing (the evil-doer)? A ruler of the people, even though guilty, should not be treated with disrespect by the people inasmuch as he wields by his own glory the might of indra and others (the protectors of the world). Narrate to me, your trustful devotee, all the doings of Vena (the son of Sunitha), O holy Brahmana-you who are the foremost of those possessing the knowledge of the past as well as of the future. Maitreya said : The royal sage Anga (once) performed a great horse-sacrifice, in which the gods did not appear (to take their share of offerings) even when invoked by the sages (who were great exponents of the Vedas). Amazed at this, the priests officiating at the sacrifice now said to the sacrificer (Emperor Anga), "The gods accept not your oblations, poured (into the fire by us). (The materials of) your offerings, O king, are pure and have been procured with reverence. The Vedic texts (recited in the course of the sacrifice) too are in no way lacking in force, since they are uttered by men who are steadfast of vow. Nor do we know of the least disrespect shown to the gods in this sacrificial performance, due to which the gods, who perceive the doings of all, should not accept their shares. Maitreya continued : Having the words of the Brahmanas (priests), the sacrificer, (Emperor) Anga, felt very sad at heart. With their permission he broke his (vow of) silence in order to ask the superintending priests the reason of it. "The gods refuse to come, even though invoked nor do they accept the cups of Soma juice (offered to them) in this sacrifice. Tell me, 0 leaders of the (sacrificial) assembly, what offence I have committed."The leaders of the assembly said : Not the least sin stands committed by you in this life, 0 lord of men Yet, there is one sin perpetrated in a previous existence, on account of which you are issueless here, though possessed of such (rare) virtues. (Therefore) with that end in view (in order to ensure that the gods may accept your offerings) endeavour to get a worthy son, O king, and God will bless you. Worshipped (by you) with the desire of obtaining a son, the Lord (who is the Enjoyer of sacrifices) will vouchsafe a son to you. In that case the denizens of heaven will (surely) accept their shares when (they find that) Sri Hari, the Deity presiding over sacrifices, Himself is invoked for the sake of a son. Sri Hari (as a rule) bestows (on His devotee) whatever boons the devotee seeks (from Him). People are rewarded precisely according as the Lord is worshipped (by them). Thus resolved, the Brahmanas (priests) offered Purodasa (a mass of ground rice rounded into a kind of cake) to Lord Visnu, who resides even in the sacrificial animal as the spirit of sacrifice, in order to secure an offspring to the emperor. From the sacrificial fire there rose a (superhuman)being, adorned with a gold necklace and clad in spotless white an bearing in a cup of gold rice ready boiled in milk with sugar. With the permission of the Brahmanas (priests) the noble-minded king received the boiled rice in the hollow of his palms and, smelling it, joyfully handed it over to his wife. The issueless queen ate that food, which possessed the efficacy of producing a male child, conceived through union with her husband and, when the time came, brought forth a son.