The conquest of Sindh, in modern-day Pakistan, although costly, was a major gain for the Umayyad Caliphate. However, further gains were halted by Hindu kingdoms during Arab campaigns. The Arabs attempted to invade India but they were defeated by the north Indian king Nagabhata of the Gurjara Pratihara Dynasty and by the south Indian Emperor Vikramaditya II of the Chalukya dynasty in the early 8th century. After the failure of further expeditions on Kathiawar, the Arab chroniclers conceded that the Abbasid caliph al-Mahdi () "gave up the project of conquering any part of India."