The first permanent Muslim foothold in the South Asian Sub-continent was achieved with Muhammad Bin Qasim's conquest of Sindh in 711 C.E. An autonomous Muslim state was e tablished apd Arabic was introduced as official language. At the time of Mahm J of Gliazna's invasion, Muslim rule still existed, though in a weakened form. n Multan and some other regions. The Ghaznavids (976-1148) and their succe sors, the Ghurids (1148-1206) were Central Asian by origin and outlook and they ruled their territories, which covered mostly the regions of present Pakistan, from capitals outside India. It was in early 13th century that the foundations of Muslim rule in India were laid with extended boundaries and Dehli as the capital. From 1206 to 1526 C.E., five different dynasties held sway. Then followed the period of Mughal ascendancy (1526-1707), and their rule continued, though nominally, till 1857. From the time of Ghaznavids, Persian teplaced Arabic as the official language. The economic, political and religious institutions developed by the Muslims bore their unique impression. The law of the state was based on Shariah and in principle the rulers were bound to enforce it.