After the Prophet passed away, Abu Bakr (r.632-634) and then Umar I(r.634-644) were elected Caliph, His worldly successor. During the reign of the latter, the Raabs conquered Syria, Palestine, Egypt, part of North Africa, and began their assault on Iran. A six-man council then offered the caliphate to Ali, the Prophet's cousin and son-in-law, but with conditions he could not accept.The Caliphate then passed to Uthman(r.644-656), who completed the overthrow of the Sassanids in Iran in 651 and established the Murjiah movement within Islam.He decreed that non-Arabs could become Muslims if outwardly they obeyed Sharia law and accepted the rule of the Caliph. Only Allah, however, could judge their inner piety. Uthman was eventually assasssinated by the faction that suppoerted Ali. Civil war caused in which first Ali and then the eldest son , Hassan, were murdered after briefly holding the Caliphate. Mu'awaiya, the prophet's brother-in-law and leader of the supporters of Uthman, finally triumped , declaring himself the first Caliph (r.661-680) of the Umayyad line (661-750). he shifted the capital from Mecca to Damascus, while the rival claim to the Ccaliphate fell upon Ali's younger brother , Husayn. The earliest contacts between the Muslim Arabs and Budhists in central Asia occurred shortly thereafter.
The Badshahi Masjid, literally the 'Royal Mosque', was built in 1674 by Aurangzeb. It is one of the Lahore's best landmarks.
Islam arrived in the area , British India, now known as Pakistanin 711 CE, when Umayyad dynasty send a Muslim Arab army led by Muhammad bin Qasim against the ruler of Sindh, Raja Dabir, this was due to the fact that Raja Dahir had given refuge to numerous Zorostrain Princes who had fled the Islamic conquest of Iran.Muhammad bin Qasim's army was defeated in the first three attempts. The Muslim army conquered the noth western part of indus vallley from Kashmir to to the Arabian Sea. The arrival of the Arab muslims to the provinces of Sindh and Punjab, along with subsequent Muslim Dynasties, set the stage for the religious boundaries of South Asia that would lead to the development of the modern state of pakistan as well as forming the foundation of Islamic rule which quickly spread across much of South Asia, including Ghaznavid, Ghrid, Delhi Sultanate, Mughals etc.from 1526 to 1739, Muslim technocrats, beaurocrats, traders, scientists, architects, teachers, and Sufis flocked from the rest of the muslim world to South Asia and in the land that became pakistan.
From the very outset, politics and religion have been intertwined both conceptually and practically in Islam because prophet Muhammad established a Government in Madina,Through the history of Islam, from Umayyad and Abbasid to the Mughals Ottomans (1300-1923), religion and state hood have been treated as one .One of the beliefs of Islam is that the purpose of the state is to provide an environment where Muslims can properly practice their religion. If a leader fails to this the people have a right to depose him.