The origin of the Gurjara-Pratihara dynasty of India is a topic of debate among historians. The rulers of this dynasty used the self-designation "Pratihara" for their clan, but have been described as "Gurjara" by their neighbouring kingdoms. Only one particular inscription of a feudatory ruler named Mathanadeva mentions him as a "Gurjara-Pratihara". According to one school of thought, Gurjara was the name of the territory (see Gurjara-desha) originally ruled by the Pratiharas; gradually, the term came to denote the people of this territory. An opposing theory is that Gurjara was the name of the tribe to which the dynasty belonged, and Pratihara was a clan of this tribe. Among those who believe that the term Gurjara was originally a tribal designation, there are disagreements over whether they were native Indians or a foreign tribe who had migrated to India somewhere around 5th century. A related question is whether the modern Gujjars are representatives of the ancient Gurjara tribe or not. The earliest mentions of the terms Gurjara, Pratihara and Gurjara-Pratihara in historical records have been analyzed by scholars to determine the origin of the dynasty. The Gurjara-Pratiharas as well as the Pratiharas of Mandor used the self-designation "Pratihara". They claimed descent from the legendary hero Lakshmana, who is described as the brother of king Rama in the Sanskrit epic Ramayana. The 837 CE Jodhpur inscription of the Mandor Pratihara ruler Bakuka states that the younger brother of Ramabhadra (Rama) served as a pratihari (door keeper) to his elder brother, because of which his descendants came to be known as Pratihara. The Sagar-Tal (Gwalior) inscription of the Gurjara-Pratihara king Mihira Bhoja says that Saumitri ("son of Sumitra", that is, Lakshmana) acted as a door-keeper for his elder brother as he defeated the enemies in a battle with Meghanada. K. A. Nilakanta Sastri theorized that the ancestors of the Pratiharas served the Rashtrakutas, and the term "Pratihara" derives from the title of their office in the Rashtrakuta court.