the arab conqueror muhammad bin qasim conquered sindh in 711 ce. the pakistan government's official chronology claims this as the time when the foundation of pakistan was laid but the concept of "pakistan" came in 19th century.the early medieval period (642–1219 ce) witnessed the spread of islam in the region. during this period, sufi missionaries played a pivotal role in converting a majority of the regional buddhist and hindu population to islam. these developments set the stage for the rule of several successive muslim empires in the region, including the ghaznavid empire (975–1187 ce), the ghorid kingdom, and the delhi sultanate (1206–1526 ce). the lodi dynasty, the last of the delhi sultanate, was replaced by the mughal empire (1526–1857 ce).