Traditional belief based on scriptural details and astrological calculations gives the date of Krishna's birth, known as Janmashtami, as either 18 or 21 July 3228 BC. Krishna belonged to the royal family of Mathura, and was the eighth son born to the princess Devaki, and her husband Vasudeva. Mathura was the capital of the Yadavas (also called the Surasenas), to which Krishna's parents Vasudeva and Devaki belonged. The king Kansa, Devaki's brother, had ascended the throne by imprisoning his father, King Ugrasena. Afraid of a prophecy that predicted his death at the hands of Devaki's eighth son, he had locked the couple into a prison cell. After Kamsa killed the first six children, and Devaki's apparent miscarriage of the seventh, being transferred to Rohini as Balram, Krishna took birth.
Since Vasudeva believed Krishna's life was in danger, Krishna was secretly taken out of the prison cell to be raised by his foster parents, Yasoda and Nanda in Gokul. Two of his other siblings also survived, Balram (Devaki's seventh child, transferred to the womb of Rohini, Vasudeva's first wife) and Subhadra (daughter of Vasudeva and Rohini, born much later than Balarama and Krishna).