Abd al-Malik ibn Marwan ibn al-Hakam (July/August 644 or June/July 647 – 9 October 705), was the fifth Umayyad caliph, ruling from April 685 until his death in October 705. A member of the first generation of born Muslims, his early life in Medina was occupied with religious pursuits. He held administrative and military posts under Caliph Mu'awiya I (r. 661–680), founder of the Umayyad Caliphate, and his own father, Caliph Marwan I (r. 684–685). By the time of Abd al-Malik's accession, Umayyad authority had collapsed across the Caliphate as a result of the Second Fitna and had been reconstituted in Syria and Egypt during his father's reign.
Following a failed invasion of Iraq in 686, Abd al-Malik focused on securing Syria before making further attempts to conquer the greater part of the Caliphate from his principal rival, the Mecca-based caliph Abd Allah ibn al-Zubayr. To that end, he concluded an unfavorable truce with the reinvigorated Byzantine Empire in 689, quelled a coup attempt in Damascus by his kinsman, al-Ashdaq, the following year, and reincorporated into the army the rebellious Qaysi tribes of the Jazira (Upper Mesopotamia) in 691. He then conquered Zubayrid Iraq and dispatched his general, al-Hajjaj ibn Yusuf, to Mecca where he killed Ibn al-Zubayr in late 692, thereby reuniting the Caliphate under Abd al-Malik's rule. The war with Byzantium resumed, resulting in Umayyad advances into Anatolia and Armenia, the destruction of Carthage and the recapture of Kairouan, the launchpad for the later conquests of western North Africa and the Iberian Peninsula, in 698. In the east, al-Hajjaj had become Abd al-Malik's viceroy and firmly established the caliph's authority in Iraq and Khurasan, stamping out opposition by the Kharijites and the Arab tribal nobility by 702. Abd al-Malik's final years were marked by a domestically peaceful and prosperous consolidation of power.
Abd al-Malik's most consequential reforms were the introduction of a single Islamic currency in place of Byzantine and Sasanian coinage and the establishment of Arabic as the language of the bureaucracy in place of Greek and Persian in Syria and Iraq, respectively. His Muslim upbringing, the conflicts with external and local Christian forces and rival claimants to Islamic leadership all influenced Abd al-Malik's efforts to prescribe a distinctly Islamic character to the Umayyad state. This also manifested with his founding of the Dome of the Rock in Jerusalem, the earliest archaeologically-attested religious monument built by a Muslim ruler and the possessor of the earliest inscriptions proclaiming Islam and the prophet Muhammad. In a significant departure from his predecessors, rule over the Caliphate's provinces was centralized under Abd al-Malik. He used loyalist Arab troops from Syria to control the provinces, reducing the reliance on local Arab garrisons. Tax surpluses from the provinces were forwarded to Damascus and the traditional stipends to veterans of the early Muslim conquests and their descendants were abolished, salaries being restricted to those in active service. The foundations established by Abd al-Malik enabled his son and successor, al-Walid I (r. 705–715), who largely maintained his father's policies, to oversee the Umayyad Caliphate's territorial and economic zenith. Abd al-Malik's centralized government became the prototype for the administrations of later medieval Muslim states.
Abd al-Malik was born in July/August 644 or June/July 647 in the house of his father Marwan ibn al-Hakam in Medina in the Hejaz (western Arabia). His mother was A'isha, a daughter of Mu'awiya ibn al-Mughira. His parents belonged to the Banu Umayya, one of the strongest and wealthiest clans of the Quraysh tribe. Muhammad was a member of the Quraysh, but was ardently opposed by the tribe before they embraced Islam in 630. Not long after, the Quraysh came to dominate Muslim politics. Abd al-Malik belonged to the first generation of born-Muslims and his upbringing in Medina, Islam's political center at the time, was generally described as pious and rigorous by the traditional Muslim sources. He took a deep interest in Islam and possibly memorized the Qur'an.
Abd al-Malik's father was a senior aide of their Umayyad kinsman, Caliph Uthman (r. 644–656). In 656, Abd al-Malik witnessed Uthman's assassination in Medina, an "event [that] had a lasting effect on him" and contributed to his "distrust" of the townspeople of Medina, according to the historian A. A. Dixon. Six years later, Abd al-Malik distinguished himself in a campaign against the Byzantines as commander of a Medinese naval unit. He was appointed to the role by his distant cousin, Caliph Mu'awiya I (r. 661–680), founder of the Umayyad Caliphate. Afterward, he returned to Medina, where he operated under his father, who had become governor of the city, as the kātib (secretary) of Medina's dīwān (bureaucracy). As with the rest of the Umayyads in the Hejaz, Abd al-Malik lacked close ties with Mu'awiya, who ruled from his power base in Damascus in Syria. Mu'awiya belonged to the Sufyanid line of the Umayyad clan, while Abd al-Malik belonged to the larger Abu al-As line. When a revolt broke out in Medina in 683 against Mu'awiya's son and successor, Caliph Yazid I (r. 680–683), the Umayyads, including Abd al-Malik, were expelled from the city. The revolt was part of the wider anti-Umayyad rebellion that became known as the Second Fitna. On the way to the Umayyad capital in Syria, Abd al-Malik encountered the army of Muslim ibn Uqba, who had been sent by Yazid to subdue the rebels in Medina. He provided Ibn Uqba with intelligence about Medina's defenses. The rebels were defeated at the Battle of al-Harra in August 683, but the army withdrew to Syria after Yazid's death later that year.
The deaths of Yazid and his successor, his son Mu'awiya II, in relatively quick succession in 683–684 precipitated a leadership vacuum in Damascus and the consequent collapse of Umayyad authority across the Caliphate. Most provinces declared their allegiance to the rival Mecca-based caliph Abd Allah ibn al-Zubayr. In parts of Syria, older-established Arab tribes who had secured a privileged position in the Umayyad court and military, in particular the Banu Kalb, scrambled to preserve Umayyad rule. Marwan and his family, including Abd al-Malik, had since relocated to Syria, where Marwan met the pro-Umayyad stalwart Ubayd Allah ibn Ziyad, who had just been expelled from his governorship in Iraq. Ibn Ziyad persuaded Marwan to forward his candidacy for the caliphate during a summit of pro-Umayyad tribes in Jabiya hosted by the Kalbite chieftain Ibn Bahdal. The tribal nobility elected Marwan as caliph and the latter became dependent on the Kalb and its allies, who collectively became known as the "Yaman" in reference to their ostensibly shared South Arabian (Yamani) roots. Their power came at the expense of the Qaysi tribes, relative newcomers who had come to dominate northern Syria and the Jazira under Mu'awiya I and had defected to Ibn al-Zubayr. The Qays were routed by Marwan and his Yamani backers at the Battle of Marj Rahit in 684, leading to a long-standing blood feud and rivalry between the two tribal coalitions. Abd al-Malik did not participate in the battle on religious grounds, according to the contemporary poems compiled in the anthology of Abu Tammam (d. 845).
Abd al-Malik was a close adviser of his father. He was headquartered in Damascus and became its deputy governor during Marwan's expedition to conquer Zubayrid Egypt in late 684. Upon the caliph's return in 685, he held a council in Sinnabra where he appointed Abd al-Malik governor of Palestine and designated him as his chosen successor, to be followed by Abd al-Malik's brother, Abd al-Aziz. This designation abrogated the succession arrangements reached in Jabiya, which stipulated Yazid's son Khalid would succeed Marwan, followed by another Umayyad, the former governor of Medina, Amr ibn Sa'id al-Ashdaq. Nonetheless, Marwan secured the oaths of allegiance to Abd al-Malik from the Yamani nobility. While the historian Gerald Hawting notes that Abd al-Malik was nominated despite his relative lack of political experience, Dixon maintains he was chosen "because of his political ability and his knowledge of statecraft and provincial administration", as indicated by his "gradual advance in holding important posts" from an early age. Marwan died in April 685 and Abd al-Malik's accession as caliph was peacefully managed by the Yamani nobles. He was proclaimed caliph in Jerusalem, according to a report by the 9th-century historian Khalifa ibn Khayyat, which the modern historian Amikam Elad considers to be seemingly "reliable".