The fifth Umayyad caliph Abd al-Malik (r. 685 - 705), who had served as the governor of Jund Filastin (military district of Palestine) under his father Caliph Marwan I, was recognized as caliph in Jerusalem. From the beginning of his caliphate, Abd al-Malik began plans for the construction of the Dome of the Rock and the al-Aqsa Mosque. The Dome of the Rock was completed in 691/2, constituting the first great work of Islamic architecture. The Dome of the Rock's construction was supervised by the Caliph's theological adviser Raja ibn Haywa of Beisan and one of his local mawali (non-Arab converts to Islam) Yazid ibn Salam. The construction of the Dome of the Chain on the Temple Mount is credited to Abd al-Malik. The Caliph and one of his generals, al-Hajjaj ibn Yusuf, who became his practical viceroy over Iraq, are credited by the Islamic tradition for constructing two gates of the Temple Mount, which the modern historian Amikam Elad proposes may be the Prophet's Gate and the Mercy Gate; both gates are attributed to the Umayyads by modern scholars. The caliph also repaired the roads to Jerusalem as attested by several milestones.