Despite the relative ease with which they had taken over Sindh, the Arabs found it difficult to expand beyond their foothold in the subcontinent. The Gurjara–Pratihara empire ruled over much of north India at that time and its armies easily fended off the Arabs. Indian inscriptions also record that the Arabs attempted to push into the Deccan through Gujarat and were repulsed by the Chalukya king Vikramaditya II. Indeed, Hindu rulers seem to have made counter-raids and continued to rule over Afghanistan till the end of the tenth century.