Overview
In early Islamic history, the governor of Medina was an official who administered the city of Medina and its surrounding territories.
During the era of the Rashidun, Umayyad and early Abbasid caliphates, the governor was generally appointed by the caliph, and remained in office until he died or was dismissed. The governorship was one of the chief administrative positions in the Hijaz and carried with it certain symbolic privileges, including the opportunity to lead the annual Muslim pilgrimage.
Rashidun governors
Known in pre-Islamic times as Yathrib, Medina (, meaning simply "The City") became the residence of the Islamic prophet Muhammad following his Hijrah from Mecca in 622 AD. Under Muhammad and the first three Rashidun caliphs, Medina acted as the capital of a rapidly increasing Muslim Empire, but its remoteness from the emerging power centers of Syria and Iraq eventually undermined its political importance. Following the assassination of the third caliph Uthman ibn Affan in July 656 and the outbreak of the First Fitna or civil war, his successor Ali ibn Abi Talib was compelled to depart from Medina in order to assert his authority in Iraq, and the city lost its status as the capital of the Islamic state.
With the departure of Ali from Medina, administration of the city was delegated to a number of representatives appointed by him. These representatives remained in control of Medina until 660, when an army dispatched by the Umayyad Mu'awiya ibn Abi Sufyan arrived at the city and forced Ali's governor to flee to Iraq.
From Wikipedia (CC BY-SA 4.0).