Monarchy was the predominant form of government in India until the not-too-distant past. Monarchy in ancient India was ruled by a King who functioned as its protector, a role which involved both secular and religious power. The meaning and significance of kingship changed dramatically between the Vedic and Later Vedic period, and underwent further development under the times of the Jain and Buddhist rulers. Although there is evidence that kingship was not always hereditary during the Vedic and into the Later Vedic period, by the time of composition of the literature, traces of elective kingship had already begun to disappear.
Kingship and the Vedas.
Vedic ideas about the establishment of the office of king ultimately draw upon legends about the coronation of one god as king of all others. Legends abound as to which of the gods won this position; In the ', Indra, Agni, Soma, Yama, and are all addressed as "King." Indeed, kingship in the ' largely manifests only in the form of gods as kings. Hymns directly addressed to earthly kings, like 10.173-10.175, are the exception rather than the rule. In these hymns, the king is said to have been "established" by Indra and "made victorious" by Soma and . Although this implies a close dependence of the king upon the gods, the rarity of the figure of the human king in the ' agrees with the idea that kings at this time were basically on a level with tribal chiefs and were not viewed as divine. There is a provocative line at 10.124.8 which mentions people electing their king, and 3.4.2 in the "Atharvaveda" seems to confirm this. Also, several hymns in the ' demonstrate the importance of the "samiti" (10.166.4, 10.191), the governing assembly, further indicating that the early Vedic king ruled in a tribal setting where decision making by assembly still played a major role.
As was stated above, the king was not considered divine in the early Vedic period. By the time the were composed, however, the king was increasingly associated with the gods through his qualities and the rituals he performed. Also by this time, kingship had transitioned to a hereditary position and the "samiti" began to wane in importance.
Dharma and the King.
Prior to the Vedas, the formation of a military fraternity governing the local population happened. As they became absorbed into the local population, political power within the society began to change from an inter-clan system in which various clans divided up responsibilities into a more Vedic-like system in which one ruler ruled over and provided for his subjects. In this new system first emerged the ideas of brahman and ksatra, or spiritual and temporal power, respectively. In order for the communal dharma to be achieved, the Brahmin had to correctly “instruct the others in their duties” and guide their spiritual practice; the Ksatriya, on the other hand, was invested with the “royal function” of maintaining obedience in accordance with dharma and thus ensuring that the proper practices were being executed. Given that the former decided on correct spiritual action while the later enforced it, an essential cooperation arose between the two in order to ensure the performance of dharma, and this cooperation formed “one of the fundamental elements in smriti’s theory of kingship”. This coincided with the development of the doctrine of the soul’s rebirth and potential release moksha from the cycle of continual rebirths known as samsara as exemplified by stories predating some of the popular epics, such as the story of Vidula in which the warrior is emotionally roused to fulfill his duties as a warrior in the face of unpleasant adversity. According to this new philosophy, rulers are to “accept and fulfill [their] duty without ever desiring that which does not have enduring worth,” in other words, by not attaching themselves to their actions and thinking of only the end result of their action. Enabling, and if necessary enforcing everyone to behave this way, “leads finally to escape from karma” and thus achieves the spiritual goal of brahma, escape from the cycle of samsara. 
As mentioned above, the best examples of this kind of detached devotion to duty by a king are seen in the epics of the Bhagavad Gita and the Ramayana.
Kingship in Dharma Literature.
Divinity of the King.
By the time of the composition of the "Mānava Dharmaśāstra", the divinity of the king had become well established. In "Manu" 7.4, the king is said to be made out of divine particles of several gods, including Yama, Indra, , and Kubera. This may be seen as closely related to the earlier belief that at his coronation, the king assumed various aspects of the gods. At "Manu" 7.8, it is stated that even an infant king must never be treated with disrespect, because he is in reality a god on earth. "Nārada" 18.49-50 echoes this sentiment, saying that the king's divinity is apparent in the force of his decrees: his words are law as soon as he utters them. This is in contrast to earlier Dharmasūtra texts, which seem to stress the king's subordinate status in comparison to Brahmins and make no mention of his divinity.
King as Protector.
The Dharmasūtras and Dharmaśāstras agree that it is the special duty of the king to protect, to punish, and to preserve dharma for those in his kingdom. However, a new myth of the creation of kingship not found in the Dharmasūtras and differing from those found in previous Vedic literature is seen in the Dharmaśāstras. At "Manu" 7.2, it is stated that the Self-existent Lord created the king to restore order to the chaotic world which had existed without him. Then the Lord created Punishment (spoken of as a deity), because through punishment the world is subdued ("Manu" 7.22). By performing his duty as protector and punisher, the king flourishes ("Manu" 7.107). The weak and helpless (i.e. widows, children, the mentally ill, the destitute) were to receive royal protection. Beyond protecting his subjects against each other, the king, as a , also had a duty to protect his subjects against external threats and wage war with rival kingdoms. "Manu" 7.87, for instance, states that a king, when challenged, must never back down from a battle; indeed, doing battle is his dharma.
"" of the King.
As was stated above "Manu" 7.2 specifically states that a who has received vedic initiation is eligible to become a king. Elsewhere, any twice-born person is forbidden to live in a country ruled over by a Śudra (4.61); likewise, Brahmins are forbidden to accept gifts from any king not of proper royal lineage (4.84). Yet commentators like Medhātithi, Kullūka, and Vijñāneśvara essentially overturned such rules about the king's lineage, stating that any person recognized as having power over a territory is to be understood as king, regardless of his "".
Authority of the King.
The basis of the king's authority is a matter of some discrepancy in the Dharma literature. Some authors of dharma texts make it seem as though the king's power lies solely in his adherence to dharma and its preservation. His edicts are powerful only in that they are in accordance with the Law; his legal decisions should be based on what is stated in the śāstras alone, not on his own will and authority. Furthermore, the king really only enforces what his Brahmin advisers declare to be dharma. The ', for example, is explicit that Brahmins will state what is dharma for the three ', and the king will govern accordingly (1.39-41). In other texts however, or even in passages in the same texts, the authority of the king involves the application of his own reason and will. So, in contrast to "Manu" 7.28-31, 8.44-45 in the same text states that the king should rely on his own powers of deduction in the administration of justice. Reasoning as a means of reaching a judgment even appears as early as the "Gautama Dharmasūtra" (11.23-24). But by the time of the "", royal decree had been placed above all other sources of law as the most powerful, abrogating all the rest. The power behind royal decrees is thus located increasingly in the king himself, even though he is still urged to preserve dharma.
Indeed, while certain sources do mention that the king kept a cohort of religious advisers to consult in regards to various religious matters, the king remained a power unto himself for the simple fact that he bore the results of his actions and decisions, an idea grounded in the reciprocity shared between the king and his subjects: the king's salvation "depends on his subjects, for he suffers the consequences of their sins and profits from the merits they acquire". Similarly, his subjects depend on him, for if he "protects them as he should," his people may devote themselves "to their duties". Moreover, while power was increasingly located within the king, his role was maintained within a set of boundaries and the role he played within society did not extend into previously untouched areas. For example, within the matter of spiritual salvation (i.e. moksa), the king played no direct role at all; it is not his responsibility to "propound any superstitious idea, to lay down any part of righteousness," or to help define "what is or is not religion" nor determine its practice. On the contrary, the king was to act as the enforcer and sometimes intermediary through which the "imperial sacrificial ceremonies" occurred. Indeed, a special "affinity with the gods," most notably Indra, resulting from his role in personally conducting special sacrifice and ensuring others likewise performed the rites is mentioned as a source of the king's authority. Examples of such sacrifices include the "Rajasuya" ("the king's inauguration sacrifice"), the "Asvamedha" ("the horse sacrifice"), and the "Aindramahabhisheka" ("The Great Consecration of Indra").
Statecraft.
Following in the tradition of the Arthaśāstra, Manu and Yājñavalkya, in defining "rājadharma" (law of or for the king) go into great detail regarding how the king is to set up his government and manage his kingdom. In "Manu", for example, the discussion of how the king should choose his ministers directly follows the description of qualities a king should cultivate. "Manu" 7.54 advises the king to choose seven or eight counselors who are learned and of noble birth, without specifically defining their '. Out of these, however, one individual should be chosen as a prime minister, and the text specifies that this individual is to be a Brahmin. "Yājñavalkya" 1.310, on the other hand, advises that all mantrins be Brahmins.
Lower officials ("amātya"s) should be assigned to duties based on their personal attributes, including honesty, intelligence, and cleverness. Among the tasks to be overseen by the "amātya"s were collecting taxes, supervising the royal mines, and collecting tolls for use of public transportation.
Manu follows in saying that envoys ("dūta") should be chosen based on cleverness and the ability to decipher hints and gestures, i.e., to read a rival king's appearance for clues as to his intentions and general disposition. The role of the envoy was vital for both diplomacy and reconnaissance. The importance of the role of the envoy can be seen in "Yājñavalkya" 13.328, where an involved set of preparations in made for both the dispatching and return of the dūta, including the meeting of the king with all his ministers.
As to the organization of his kingdom, a king, according to Manu, should place constables between ever second, third, and fifth village, and at the hundredth village. Superintendents with jurisdiction over one, ten, twenty, a hundred, and a thousand villages should also be appointed (' 3.9-10 has one, ten, a hundred, and a whole district). Any problems arising in villages are to be reported to progressively higher superintendents; states that when a solution is not reached by a lower superintendent, the problem must be reported to the next highest superintendent and so on.
The King and Legal Procedure.
According to Nārada, the king is the highest venue of legal procedure. This would indicate that only the most important of cases would be heard directly by the king, i.e. cases for which a decision had not been reachable in local community or guild courts. Manu and both state that the king may either try cases himself (accompanied, of course, by Brahmin jurists), or he may appoint a Brahmin judge to oversee trials for him. Manu even allows that a non-Brahmin