The Battle of Rajasthan is a battle (or series of battles) where the Gurjar Hindu alliance defeated the Arab invaders in 738 CE The final battle took place somewhere on the borders of modern Sindh-Rajasthan. Following their defeat the remnants of the Arab army fled to the other bank of the River Indus.The main Indian kings who contributed to the victory over the Arabs were the north Indian Gurjar Emperor Nagabhata I of the Pratihara Dynasty and the south Indian Gurjar Emperor Vikramaditya II of the Chalukya dynasty in the 8th century.
The most powerful kingdoms of North India in the 8th century were the Gurjara Pratihara dynasty and the Pala dynasty.
In the early 8th Century the Kingdom of Sindh under Brahmin King Dahir of the Rai dynasty was convulsed by internal strife——taking advantage of the conditions the Arabs assaulted it and occupied it under Muhammad ibn Qasim, the nephew of Al-Hajjaj (governor of Iraq and Khurasan). Qasim and his successors attempted to expand from Sindh into Punjab and other regions but were badly defeated by Lalitaditya of Kashmir and Yasovarman of Kannauj.
Junayd ibn Abd al-Rahman al-Murri, the successor of Muhammad ibn Qasim, in Sindh led a large army into the region in early 730 CE. Dividing this force into two he plundered several cities in southern Rajasthan, western Malwa, and Gujarat. The southern army moving south into Gujarat was defeated at Navsari by Avanijanashraya Pulakesi who was sent by the South Indian Gurjar Emperor Vikramaditya II of the Chalukya Empire. The army that went east, reached Avanti whose ruler Gurjara Pratihara Nagabhata I utterly defeated the invaders and they fled to save their life.
The Battle of Rajasthan
Gauging at the seriousness of the situation as well as the power of the arab forces, pratihara king, Nagabhata made pact with Jaysimha Varman of the Rashtrakuta Empire. Jaysimha in turn sent his son Avanijanashraya Pulakesi to support Nagabhata. The two Dynasties of India supplemented the already fighting Hindu Gurjar Mewar Kingdom, under Bappa Rawal, at the border of Rajasthan.
The battle was fought between 5,000-6,000 Gurjar Infantry and cavalry facing more than 30,000 Arabs. The Gurjar fought bravely and managed to kill the Arab leader Emir Junaid during the war. This enhanced the morale of the Gurjar hindu forces while the Arabs disorganized and demoralized due to their leaders death retreated and were frequently attacked by local forces until they reached the indus river taking great casualties.
Junayd's successor Tamim ibn Zaid al-Utbi organized a fresh campaigns against Rajasthan but failed to hold any territories there. He would be further pushed across River Indus by the combined forces of the King of Kannauj, Nagabhata thus limiting the Arabs to the territory of Sindh across River Indus.
The Arabs crossed over to the other side of the River Indus, abandoning all their lands to the victorious Indian kings. The local chieftains took advantage of these conditions to re-establish their independence. Subsequently the Arabs constructed the city of Mansurah on the other side of the wide and deep Indus, which was safe from attack. This became their new capital in Sindh.