The Mahabharata is an ancient Indian epic where the main story revolves around two branches of a family – the Pandavas and Kauravas – who, in the Kurukshetra War, battle for the throne of Hastinapura. Interwoven into this narrative are several smaller stories about people dead or living, and philosophical discourses. Krishna-Dwaipayan Vyasa, himself a character in the epic, composed it; as, according to tradition, he dictated the verses and Ganesha wrote them down. At 100,000 verses, it is the longest epic poem ever written, generally thought to have been composed in the 4th century BCE or earlier. The events in the epic play out in the Indian subcontinent and surrounding areas. It was first narrated by a student of Vyasa at a snake-sacrifice of the great-grandson of one of the major characters of the story. Including within it the Bhagavad Gita, the Mahabharata is one of the most important texts of ancient Indian, indeed world, literature.
Shantanu, the king of Hastinapur, was married to Ganga (personification of the Ganges) with whom he had a son called Devavrat. Several years later, when Devavrat had grown up to be an accomplished prince, Shantanu fell in love with Satyavati. Her father refused to let her marry the king unless the king promised that Satyavati’s son and descendants would inherit the throne. Unwilling to deny Devavrat his rights, Shantanu declined to do so but the prince, on coming to know of the matter, rode over to Satyavati’s house, vowed to renounce the throne and to remain celibate throughout his life. The prince then took Satyavati home to the palace so that the king, his father, could marry her. On account of the terrible vow that he’d taken that day, Devavrat came to be known as Bheeshm. Shantanu was so pleased with his son that he granted to Devavrat the boon of choosing the time of his own death.
In time, Shantanu and Satyavati had two sons. Soon thereafter, Shantanu died. Satyavati’s sons still being minors, the affairs of the kingdom were managed by Bheeshm and Satyavati. By the time these sons reached adulthood, the elder one had died in a skirmish with some gandharvas (heavenly beings) so the younger son, Vichitravirya, was enthroned. Bheeshm then abducted the three princesses of a neighbouring kingdom and brought them over to Hastinapur to be wedded to Vichitravirya. The eldest of these princesses declared that she was in love with someone else, so she was let go; the two other princesses were married to Vichitravirya who died soon afterwards, childless.