The old king had died without issue, but sons had been fathered on his two widows by his half-brother; by the Hindu laws of the levirate, those sons became the legal heirs of the dead king.
To complicate the situation further, the elder son, Dhritarashtra, although he was renowned through all the world for his wisdom and strength, had been born blind and so was not eligible to assume the kingship. His younger brother Pandu, then, assumed the throne of Hastinapura.
Then one day, before either of Pandu’s wives had conceived her first child, the king was out hunting, and he shot and mortally wounded a stag in the act of copulating with his mate. Before the stag died, he cursed Pandu.
"Oh King, what you have done is unlawful. The next time you attempt intercourse, your head will break apart and you will die."
Pandu was devastated. In the world of the Mahabharata, such curses always come true, and Pandu realized that the stag’s curse meant that he could never have sons. So he stepped down from the throne; he and his wives put on the garb of wandering hermits and went to live in the forest, leaving the kingdom under the stewardship of blind Dhritarashtra.
Then, in the woods, Pandu’s senior wife Kunti revealed that she possessed a secret mantram, a magical incantation, that would invoke a God to fill her womb with his power.
Pandu was delighted. Another section of the levirate laws declared that sons fathered on one’s wife by a god were lawful sons. With the aid of the mantram, Pandu had five sons, known collectively as the Pandavas, the sons of Pandu.
Yudhisthira, the eldest, was conceived by Dharma the god, who embodies dharma the law which is constant through all time and circumstance. Yudhishtira grew to be the wisest and most law-abiding of men; indeed, he is known as Lord Dharma. And he was a champion chariot warrior.
The god father of Bhima, Pandu’s next son, was Vayu, the wind, and Bhima grew to be enormously strong, with a voracious appetite; he is known as Wolf-belly, and he had fame in three worlds for his strength as a club fighter.
Finally, Kunti bore Arjuna. Arjuna’s father was Indra, King of the gods, Thunderbolt-Wielder, Destroyer of Cities. Arjuna grew to be a master of weapons, the Left-handed Archer, the Lord of Victory.
Pandu’s second wife, Madri, also used the mantram. She conceived twin sons by the twin physician gods, the Aswins, and Nakula and Sahadeva grew to be expert swordsmen.
While all this was going on in Pandu’s forest exile, the blind king Dhritarashtra, back in Hastinapura, had found miraculous intervention for his own issue, and his wife, the virtuous Gandhari, had born 100 sons. The eldest and chief of Dhritarashtra’s sons was Duryodhana, and he had assumed the role of crown prince in Hastinapura.
Then back in the forest, one spring day, Pandu happened upon Madri bathing, and she was so beautiful, so desireable, that he could no longer control himself, and Madri lacked the strength and the will to prevent him. He had her, the murdered stag’s curse kicked in, and Pandu paid his karmic debt. Madri was so unbalanced by Pandu’s death and her complicity in it that she threw herself on the funeral pyre and left the story to Kunti.
Kunti, for her part, packed up the five boys and took them to Hastinapura. "Here," she said to Dhritarashtra, "are the sons of Pandu."