The demon Kansa ruled the city of Mathura cruelly until a prophecy foretold that Devaki's eighth son would kill him. When Devaki married Vasudev, the prophecy was revealed. Kansa imprisoned them and killed their first six sons. Their eighth son, Krishna, was secretly taken by Vasudev to the cowherd Nand to be raised safely. Krishna later returned and killed Kansa, fulfilling the prophecy.