Krishna was born to Devaki and Vasudev in the prison of Mathura. His life was immediately in danger due to the threat posed by his maternal uncle, King Kansa of Mathura. According to a prophecy, a divine voice foretold that one of Devaki's children would be the cause of Kansa's death. Fearing this, Kansa resolved to kill all of his sister's newborn children.
To protect Krishna, Vasudev decided to secretly carry him in a basket across the Yamuna River. It was raining terribly the night Vasudev was carrying him to Vrindavan. Out of nowhere, a thousand-headed snake, "Shesh Naag" appeared and expanded his hood to form an umbrella-like structure to protect Krishna and Vasudeva.
Krishna was then raised by Yashoda and Nanda in Vrindavan.