Devaki and Vasudeva were imprisoned by her brother, Kamsa or Kansa, due to the prophecy during her wedding. Kansa then killed six of their sons. The seventh, Balarama, escaped death by being transferred to the womb of Vasudeva's other wife, Rohini, while a female child (an incarnation of the goddess Yoga-Nidra or Maya) was placed in Yashoda's womb. The eighth son, Krishna (who was actually an Avatar of Vishnu), was born at midnight and taken by Vasudeva across the Yamuna river to be raised by Nanda and Yasoda in the neighboring village of Gokul. In place of Krishna, Vasudeva took Yashoda's just born child (the incarnation of Yogmaya). After Vasudeva's return to Mathura with the baby girl (yog-maya), Kansa tried to destroy her. Then she flew out of his hands, turned into an eight-armed goddess and warned him: "fool, the agent of your death has already been born on this earth." Lord Krishna and Balarama returned to Mathura as adolescent boys and killed the despotic Kansa. Subsequently, Krishna freed his parents, and his grand-uncle Ugrasena (who had also been locked up).
Post Kansa's death
In the state of Goa, Devaki Krishna Sansthan temple is a unique temple,perhaps is the only temple in India where Lord Krishna is worshiped alongside mother Devaki. The main Deities Devakikrishna and affiliate deities of Bhumika Devi, Laxmi Ravalnath, Mallinath, Katyayani, Chodaneshwar and Dhada Shankar were originally located at Choodamani island (Chorao island of today). To avoid persecution during the Goa Inquisition they were taken to Mayem in Bicholim and from there shifted to the present location at Mashel. The Garbha Griha (inner sanctum) of the temple has the beautiful idol of Devaki and Lord Krishna. The idol of Devaki is in standing posture holding baby Krishna with her left hand.