Kshatriya (from kshatra, "rule, authority") is one of the four varna (social orders) of the Hindu society. The Sanskrit term kshatriya is used in the context of Vedic society wherein members organised themselves into four classes: brahmin, kshatriya, vaishya and shudra. Traditionally, the kshatriya constituted the ruling and military elite. Their role was to protect society by fighting in wartime and governing in peacetime. The Prakrit derivative of Kshatriya is "Khatri".
The administrative machinery in the Rig Vedic period functioned with a tribal chief called Rajan whose position was not hereditary. The king was elected in a tribal assembly, which included women, called Samiti. The Rajan protected the tribe and cattle; was assisted by a priest; and did not maintain a standing army, though in the later period the rulership appears to have risen as a class. The concept of fourfold varna system was non-existent.
The hymn Purusha Sukta to the Rigveda describes the mythical history of the four varna. Some scholars consider the Purusha Sukta to be a late interpolation into the Rigveda based on the neological character of the composition, as compared to the more archaic style of the vedic literature. Since not all dark-skinned Indians was fully regulated under the varna in the vedic society, the Purusha Sukta was supposedly composed in order to secure vedic sanction for the heredity caste scheme. An alternate explanation is that the word 'Shudra' does not occur anywhere else in the Rig-veda except the Purusha Sukta, leading some scholars to believe the Purusha Sukta was a composition of the later Rig-vedic period itself to denote, legitimise and sanctify an oppressive and exploitative class structure that had already come into existence then.
Although the Purusha Sukta uses the term rajanya, not kshatriya, it is considered the first instance in the Vedic texts that now remained where four social classes are mentioned for the first time together. Usage of the term Rajanya possibly indicates the 'kinsmen of the rajan' (i.e., kinsmen of the ruler) had emerged as a distinct social group then, such that by the end of the vedic period, the term rajanya was replaced by kshatriya; where rajanya stresses kinship with the rajan and kshatriya denotes power over a specific domain. The term rajanya unlike the word kshatriya essentially denoted the status within a lineage. Whereas kshatra, means "ruling; one of the ruling order".