Kshatriya (from Sanskrit kṣatra, "rule, authority") is one of the four varna (social orders) of Hindu society, associated with warriorhood. The Sanskrit term kṣatriyaḥ is used in the context of Vedic society wherein members were organised into four classes: brahmin, kshatriya, vaishya and shudra.
The administrative machinery in the Vedic India was headed by 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 symbolic creation of the four varna-s through cosmic sacrifice (yajña). 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 Indians were 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".
Jaiswal points out the term Brahman rarely occurs in the Rig-veda with the exception of the Purusha Sukta and may not have been used for the priestly class. Based on the authority of Panini, Patanjali, Katyayana and the Mahabharata, Jayaswal believes that Rajanya was the name of political people and that the Rajanyas were, therefore, a democracy (with an elected ruler). Some examples were the Andhaka and Vrsni Rajanyas who followed the system of elected rulers. Ram Sharan Sharma details how the central chief was elected by various clan chiefs or lineage chiefs with increasing polarisation between the rajanya (aristocracy helping the ruler) and the vis (peasants) leading to a distinction between the chiefs as a separate class (raja, rajanya, kshatra, kshatriya) on one hand and vis (clan peasantry) on the other hand.
The term kshatriya comes from kshatra and implies temporal authority and power which was based less on being a successful leader in battle and more on the tangible power of laying claim to sovereignty over a territory, and symbolising ownership over clan lands. This later gave rise to the idea of kingship. The Srimad Bhagavata Gita has the following quoted lines by Sri Krishna:
शौर्यं तेजो धृतिर्दाक्ष्यं युध्दे चाप्यपलायनम् ।
दानमीश्वरभावश्च क्षात्रं कर्म स्वभावजम् ॥१८-४३ ॥
Kshatriya never flees from the war, he shows bravery, skill, chivalry and patience in the face of war. Donation to the society and protecting citizens (Kshatra duty) are the norms of a Kshatriya.
In the period of the Brahmanas (800 BCE to 700 BCE) there was ambiguity in the position of the varna. In the Panchavimsha Brahmana (13,4,7), the Rajanya are placed first, followed by Brahmana then Vaishya. In Shatapatha Brahmana 18.104.22.168, the Kshatriya are placed second. In Shatapatha Brahmana 22.214.171.124 the order is—Brahmana, Vaishya, Rajanya, Shudra. The order of the brahmanical tradition—Brahmana, Kshatriya, Vaishya, Shudra—became fixed from the time of dharmasutras (450 BCE to 100 BCE). The kshatriya were often considered pre-eminent in Buddhist circles. Even among Hindu societies they were sometimes at rivalry with the Brahmins, but they generally acknowledged the superiority of the priestly class.
Writing in the context of how the jajmani system operated in the 1960s, Pauline Kolenda noted that the "caste function of the Kshatriya is to lead and protect the village, and with conquest to manage their conquered lands. The Kshatriyas do perform these functions today to the extent possible, by distributing food as payments to kamins and providing leadership."
The Vedas do not mention kshatriya (or varna) of any vansha (lineage). The lineages of the Itihasa-Purana tradition are: the Solar dynasty (Suryavanshi); and the Lunar dynasty (Chandravansi]] / Somavanshi).
There are other lineages, such as Agnivanshi ("fire lineage"), in which an eponymous ancestor rises out of Agni (fire), and Nagavanshi (snake-born), claiming descent from the Nāgas. The Nagavanshi, not attested in the Itihasa-Purana tradition, were Naga tribes whose origin can be found in scriptures.