The Shanti Parva of Mahabharata while discussing war and peace states that every king had to face neighbors who were less than friendly. The first requisite was protection of one’s territory. For this purpose the capital was to be fortified, and five types of forts – land, water, hill, forest and man-made – were to be erected throughout one’s kingdom.
The army was to be well provided with weapons and was to be commanded by a valorous person. The king was to try to secure as many friends as possible, thus isolating the opponent. Although war was the final arbiter in any dispute, it was to be the last resort.
A wise king attained his goals by attempting to reach an understanding through persuasion (sama), by engineering dissensions among the ministers of the opponents (bheda) or by bribing them. Aggression was to be launched against an opponent when he was at his weakest, when he was engaged in a struggle with someone else or when he was without any friend.
The well-being of a king depended on well looked-after and satisfied subjects. Peace and tranquility were the essential conditions of a healthy kingdom. These could be ensured by following dharma, adherence to the four-fold varna and the four-fold ashrama, as well as the four goals of dharma, artha, kama and moksha. This would lead to a balanced way of life thereby keep everybody happy.