Vasudev, a descendent of Yadu and hailing from the Lunar Dynasty, married Rohini, the daughter of King Rohan and later again married the sister of King Kansa - Devaki. On the very moment of their marriage, a heavenly voice declared the future of this nuptial bond, saying that the eighth child of Vasudev and Devaki will be the reason of King Kansa's death. Kansa was furious on hearing this and decided to slay down the groom of his only sister. However, somehow controlled, King Kansa went forward to slay each of the six sons born to Vasudev and Devaki. The couple was held in impenetrable prison within his kingdom.
When, Devaki was pregnant for the seventh time, the serpent Shesh or Ananta on whom Narayana rests, took an avartara birth. In order to save his seventh child, Lord Vishnu took up an incarnation and transferred the child from Devaki's womb to Rohini, who lived in Gokula. She took care of the child and lovingly named him Balarama. Nand and his wife Yasoda living in the same place, were still childless and yearned for one. Lord Vishnu appeared in the dreams of Devaki and narrated her whole incident of her seventh child and later Vasudev told King Kansa that the child was miscarried by Devaki.
Lord Krishna took birth in Devaki's womb; however during the same time Lord Vishnu destined the pregnancy of Yashoda in Gokula, as if both shall have the child at the same time. When Kansa learnt that his sister was about to deliver another child, he took stern steps of slaying the child immediately he was born. Finally the avatara of Lord Vishnu was born and the realms of earth and heaven were flowing with happiness and prosperity. The forests bloomed with fruits and flowers, rivers flew swiftly and birds were singing sweet songs. The Gods showered flowers on the child and gandharvas played divine instruments.
As Lord Krishna was born, Devaki and Vasudev saw his divine appearance. The cloudy grey, moon faced, lotus eyed, crowned and wearing jeweled robe with four arms holding conch, mace, lotus flower and disc assured his parents that he was no ordinary child. Vasudev and Devaki bowed down to the Lord and He assured them of safety and well-being. He asked his parents to take him to mother Yashoda and bring her daughter to deliver to King Kansa. The image of the Almighty slowly merged into the body of the lying child.
Devaki pleaded Vasudeva to take the child to their friends Nand and Yashoda in Gokula to keep his safe from the plight of her brother. Vasudeva agreed to the proposal and took the divine child in his arms. At that very moment, the guards fell fast asleep; fetters fell from the limbs of the couple and the all the gateways opened stealthily. Vasudev placed his son in a basket, took it on his head and set out for Gokula. He faced the tumultuous Yamuna River and was bewildered seeing its current and force. However, he prayed to Lord Vishnu and entered the water. The level of the water rose more and more, reaching his nose. Lord Krishna saw his distress and stretched out his tiny foot from the basket, as soon as it touched the water, the level of the water sank down.
Vasudeva crossed River Yamuna and reached Nand's house, and saw the baby girl born to Yashoda. He slowly took the baby girl in his basket and placed Lord Krishna beside Yashoda. On returning to Mathura, into his prison, again the fetters came back into his limbs and the scenario changes as they were before. Suddenly, the baby started to cry loudly and the news of her birth went to King Kansa immediately. When the king heard that the child was a girl, he was much relieved of the terror and started to treat his sister and Vasudev warmly. However, he was enraged against the Gods because he believed that they tried to deceive him and lamented for loosing the chance of killing Vishnu himself.
Lord Krishna grew up with all comforts and love in Gokula, but King Kansa in Mathura could not forget the heavenly prediction and eventually ordered to kill all the devotees of Lord Vishnu. Following his orders, all Brahmans, Yogis, Sanyasis and religious individuals were killed mercilessly all across Mathura and surrounding places.