Mahabharata is one of the longest epic poems in the world with nearly one hundred thousand verses and around 1.8 million words in all. It is about 10 times the length of Iliad and Odyssey taken together, 5 times longer than Divine Comedy by Dante and roughly 4 times longer than the Ramayana . This great tale of an epic war tells us a lot about those times and the principles people back then lived by and died for. It also helps us a great deal in understanding the political and legal philosophy of the Mahabharata era.
The exact date of the Mahabharata war has been in dispute for long now. However, on the basis of the planetary positions mentioned in the Mahabharata and the celestial occurrences described therein, one Dr. P. V. Vartak has been able to calculate the exact date when the great war of Mahabharata commenced. According to him the twelve planets were in that position on this particular date only and would come in the same position again only after 2229 crore years. The date thus deduced by him is October 16, 5561 BC. The great war of Mahabharata, therefore, began on this day and ended exactly 18 days after on November 2, 5561 BC. Although it is possible to dispute Dr. Vartak's claims but the manner in which he arrived at the date makes it hard for one to dismiss his claim lightly.
In the times of the Mahabharata there were several independent states under different kings and each of these states were sovereign. Like in the West, Divine Rights find acceptance in this part of the world. However, when it comes to Aryan tradition, the King is not placed as comfortably and as securely as in the West. The King was dutybound to take care of his subjects in the same manner as a father would take care of his children, failing which he would no longer be deserving of the throne and would therefore be liable to be unseated. So, any mandate of any kind from any level of the heavens would not stand in the way of anyone who seeks to dislodge an unjust king. King in the Aryan scheme of things is the supreme protector of the people. Bhishma says to Yudhishthira in course of educating him about the supreme duties of the King thus:
Protect thy subjects righteously, O son of Pandu, for no regret or pain will then be thine. Protection of the subject is the highest duty of the king, since compassion to all creatures and protecting them from injury has been said to be the highest merit. Persons conversant with duties regard that to be the highest merit of the king, when, engaged in protecting all creatures, the king displays compassion towards them. The sin a king incurs by neglecting for a single day to protect his subjects from fear is such that he does not attain to end of his sufferings (for it) in hell till after a thousand years.
So, irrespective of the sovereignty of the States, the kings were supposed to govern their respective territories in accordance with certain principles, failing which it would be open and legitimate for any just king to annex the kingdom of such a king to his territory. And the inhabitants of such a kingdom would do no wrong if they were to welcome the invader in that case. In this regard, Bhishma says:
If a powerful king approaches kingdoms weakened by anarchy, from desire of annexing them to his dominions, the people should go forward and receive the invader with respect.
To annex a kingdom suffering from misrule is in accordance with the principles of righteous conduct, and in some cases it may become the duty of a just king to invade such a kingdom in order to end the misery of its people. However, to invade solely for territorial expansion or for revenge was considered against the law (Dharma). The term 'Dharma' is a broad term and takes different meanings in different contexts. However, the term very often stands for the Supreme Law that is uniformly applicable to all kings and subjects irrespective of the individual sovereignty of the kingdoms.
Therefore, despite being independent and sovereign, all kingdoms were subject to the Supreme Law generally referred to as 'Dharma'. Any king that violated the Supreme Law would be looked down upon and could be legitimately attacked.
Jarasandha was a powerful king of Magadha, and had expanded his empire far and wide. He attacked and conquered many a kingdom and apprehended and jailed a good number of kings. It is permissible for a king to expand his circle of influence, but for that, treaty and marriage were the acceptable means. To invade solely for territorial expansion was by and large against the Supreme Law. But it was nearly impossible to defeat Jarasandha in the battlefield. Jarasandha was a haughty king and was therefore a threat to peace. Lord Krishna has Bheema challenge Jarasandha for a straight duel. Jarasandha accepts the challenge and dies at the hands of Bheema. However, despite having won the kingdom of Magadha by defeating Jarasandha, Lord Krishna asks Bheema to return it back to Jarasandha's son, who is then made the king of Magadha, after all the kings in the captivity are released and their kingdoms returned.
The reason seems to be that Jarasandha was an unjust king only in terms of the foreign policy he pursued, but he was not a bad king when it came to taking care of his own people. Therefore, he was the offender of the Supreme Law only to a certain extent. Furthermore, he was not defeated in the battlefield, which meant that his kingdom had not been 'annexed' in the strict sense of the term though having defeated him Bheema did have an individual claim to the throne. Jarasandha's son was an able prince and could be a competent king by all means. Therefore, his individual claim to the throne was greater than Bheema's individual claim. Furthermore, since Jarasandha was not a bad king to his people, the legitimacy that flows from the consent of the ruled was not available to Bheema. Hence, it would have been illegitimate and against the Supreme Law for Bheema to take the throne.
Besides, it was a sound political bargain to earn the friendship of a powerful nation by giving up the throne to the natural heir instead of wasting energy and resources in trying to rule a hostile nation. So, Lord Krishna made a decision that was both legally and politically sound. After all, it is not for no reason that he is considered to be by far the greatest political strategist of his time.