The royal family and citizens were drowning in grief, but the kingdom could not remain without a king for long. Thus, Janamejaya, the son of Pareekshit, was coronated as the King of Hastinapura.
To avenge his father's death, he resolved to annihilate the entire serpent clan and, therefore, conducted a snake sacrifice. Hundreds of sages participated in the sacrifice, chanting powerful mantras. Among them was Sage Vaishampayana, a disciple of Maharshi Vedavyasa, the author of the Mahabharata.
As the sacrifice progressed, Janamejaya began posing philosophical and historical questions about his ancestors, the Pandavas and the Kauravas. He was particularly curious about the events that had led to the destruction of his lineage and the fall of the Kuru dynasty. At this juncture, Sage Vaishampayana, with Maharshi Vyasa's permission, began narrating the Mahabharata. He recounted the epic as it had been composed by his guru, elaborating on the events leading to the great Kurukshetra War and its aftermath.
One by one, snakes fell into the sacrificial fire and perished. Takshaka, the king of serpents, was about to fall into the fire when Sage Astika intervened and questioned Janamejaya:
"O King, is it just to destroy the entire serpent clan for the actions of one?"
Emperor Janamejaya realized his folly and halted the snake sacrifice. Takshaka's life was spared.