Islam in Pakistan existed in communities along the Arab coastal trade routes in Sindh as soon as the religion originated and had gained early acceptance in the Arabian Peninsula. The connection between the Sind and Islam was established by the initial Muslim missions during the Rashidun Caliphate. Al-Hakim ibn Jabalah al-Abdi, who attacked Makran in the year 649 AD, was an Army officer of Caliph Ali. During the Caliphate of Ali, many Hindus of Sindh had came under influence of Islam and some even participated in the Battle of Camel and died fighting for Ali. Under the Umayyads (661 - 750 AD), many Shias sought asylum in the region of Sindh, to live in relative peace in the remote area. Ziyad Hindi is one of those refugees. In 712 CE, a young Arab general Muhammad bin Qasim conquered most of the Indus region for the Caliphal empire, to be made the "As-Sindh" province with its capital at Al-Mansurah. By the end of the 10th century CE, the region was ruled by several Hindu Shahi kings who would be subdued by the Ghaznavids.