The Bhagavata Purana and related Puranic sources narrate that Krishna was born to Devaki and Vasudeva while both were imprisoned by Devaki's own brother, the tyrannical King Kamsa of Mathura, who had been warned by a prophecy that Devaki's eighth child would bring about his death, and who had accordingly killed each of her previous children at birth. When Krishna, the eighth child, was born, the prison's chains and guards were miraculously overcome, according to the tradition, and Vasudeva carried the infant across the Yamuna river, which parted to let him pass, to the home of the cowherd chief Nanda and his wife Yashoda in Gokul, exchanging Krishna for their own newborn daughter to protect him from Kamsa's continued threat.
Krishna grew up in Gokul and later Vrindavan among cowherd communities, celebrated in Puranic and later devotional literature for his childhood exploits, his mischievous stealing of butter, his defeat of various demons sent by Kamsa to kill him, and his eventual return to Mathura as a young man to confront and kill Kamsa, fulfilling the prophecy that had shaped his entire early life in hiding.
His birth is regarded as one of the central events of Vaishnava devotional tradition, and the story's core elements, imprisonment, prophecy, miraculous escape and a hidden childhood among humble foster parents, have made it one of the most widely retold and dramatized narratives in Hindu devotional literature and performance.