Early challenges
Though Umayyad rule had been restored in Syria and Egypt, Abd al-Malik faced several challenges to his authority. Most provinces of the Caliphate continued to recognize Ibn al-Zubayr, while the Qaysi tribes regrouped under Zufar ibn al-Harith al-Kilabi and resisted Umayyad rule in the Jazira from al-Qarqisiya, a Euphrates river fortress strategically located at the crossroads of Syria and Iraq.
Re-establishing Umayyad rule across the Caliphate was the major priority of Abd al-Malik. His initial focus was the reconquest of Iraq, the Caliphate's wealthiest province. Iraq was also home to a large population of Arab tribesmen, the group from which the Caliphate derived the bulk of its troops. In contrast, Egypt, which provided significant income to the treasury, possessed a small Arab community and was thus a meager source of troops. The demand for soldiers was pressing for the Umayyads as the backbone of their military, the Syrian army, remained fractured along Yamani and Qaysi lines. Though the roughly 6,000 Yamani soldiers of Abd al-Malik's predecessor were able to consolidate the Umayyad position in Syria, they were too few to reassert authority throughout the Caliphate. Ibn Ziyad, a key figure in the establishment of Marwanid power in Syria, set about enlarging the military by recruiting widely among the Arab tribes, including those which nominally belonged to the Qaysi faction.
Ibn Ziyad had been tasked by Abd al-Malik's father with the reconquest of Iraq. At the time, Iraq and its dependencies were split between the pro-Alid forces of Mukhtar al-Thaqafi in Kufa and the forces of Ibn al-Zubayr's brother Mus'ab in Basra. In August 686, Ibn Ziyad's 60,000-strong army was routed at the Battle of Khazir and he was slain, alongside most of his deputy commanders, at the hands of Mukhtar's much smaller pro-Alid force led by Ibrahim ibn al-Ashtar. The decisive defeat and the loss of Ibn Ziyad represented a major setback to Abd al-Malik's ambitions in Iraq. He refrained from further major campaigns in the province for the next five years, during which Mus'ab defeated and killed Mukhtar and his supporters and became Iraq's sole ruler.
Abd al-Malik shifted his focus to consolidating control of Syria. His efforts in Iraq had been undermined by the Qaysi–Yamani schism when a Qaysi general in Ibn Ziyad's army, Umayr ibn al-Hubab al-Sulami, defected with his men mid-battle to join Zufar's rebellion. Umayr's subsequent campaign against the large Christian Banu Taghlib tribe in the Jazira sparked a series of tit-for-tat raids and further deepened Arab tribal divisions, the previously neutral Taghlib throwing in its lot with the Yaman and the Umayyads. The Taghlib killed Umayr in 689 and delivered his head to Abd al-Malik.
Along Syria's northern frontier, the Byzantines had been on the offensive since the failure of the First Arab Siege of Constantinople in 678. In 679, a thirty-year peace treaty was concluded, obliging the Umayyads to pay an annual tribute of 3,000 gold coins, 50 horses and 50 slaves, and withdraw their troops from the forward bases they had occupied on the Byzantine coast. The outbreak of the Muslim civil war allowed the Byzantine emperor Constantine IV (r. 668–685) to extort territorial concessions and enormous tribute from the Umayyads. In 685, the emperor led his army to Mopsuestia in Cilicia, and prepared to cross the border into Syria, where the Mardaites, an indigenous Christian group, were already causing considerable trouble. With his own position insecure, Abd al-Malik concluded a treaty whereby he would pay a tribute of 1,000 gold coins, a horse and a slave for every day of the year.
Under Justinian II (r. 685–695, 705–711), the Byzantines became more aggressive, though it is unclear whether they intervened directly as reported by the 9th-century Muslim historian al-Baladhuri or used the Mardaites to mount pressure on the Muslims: Mardaite depredations extended throughout Syria, as far south as Mount Lebanon and the Galilee uplands. These raids culminated with the short-lived Byzantine recapture of Antioch in 688. The setbacks in Iraq had weakened the Umayyads, and when a new treaty was concluded in 689, it greatly favored the Byzantines: according to the 9th-century Byzantine chronicler Theophanes the Confessor, the treaty repeated the tribute obligations of 685, but now Byzantium and the Umayyads established a condominium over Cyprus, Armenia and Caucasian Iberia (modern Georgia), the revenue from which was to be shared between the two states. In exchange, Byzantium undertook to resettle the Mardaites in its own territory. The 12th-century Syriac chronicler Michael the Syrian, however, mentions that Armenia and Adharbayjan were to come under full Byzantine control. In reality, as the latter regions were not held by the Umayyads at this point, the agreement probably indicates a carte blanche by Abd al-Malik to the Byzantines to proceed against Zubayrid forces there. This arrangement suited both sides: Abd al-Malik weakened his opponent's forces and secured his northern frontier, and the Byzantines gained territory and reduced the power of the side that was apparently winning the Muslim civil war. About 12,000 Mardaites were indeed resettled in Byzantium, but many remained behind, only submitting to the Umayyads in the reign of al-Walid I (r. 705–715). Their presence disrupted Umayyad supply lines and obliged them to permanently keep troops on standby to guard against their raids.
The Byzantine counteroffensive represented the first challenge against a Muslim power by a people defeated in the early Muslim conquests. Moreover, the Mardaite raids demonstrated to Abd al-Malik and his successors that the state could no longer depend on the quiescence of Syria's Christian majority, which until then had largely refrained from rebellion. The modern historian Khalid Yahya Blankinship described the treaty of 689 as "an onerous and completely humiliating pact" and surmised that Abd al-Malik's ability to pay the annual tribute in addition to financing his own wartime army relied on treasury funds accrued during the campaigns of his Sufyanid predecessors and revenues from Egypt.
In 689/90, Abd al-Malik used the respite from the truce to initiate a campaign against the Zubayrids of Iraq, but was forced to return to Damascus when al-Ashdaq and his loyalists abandoned the army's camp and seized control of the city. Al-Ashdaq viewed Abd al-Malik's accession as a violation of the caliphal succession agreement reached in Jabiya. Abd al-Malik besieged his kinsman for sixteen days and promised him safety and significant political concessions if he relinquished the city. Though al-Ashdaq agreed to the terms and surrendered, Abd al-Malik remained distrustful of the former's ambitions and executed him personally.
Zufar's control of al-Qarqisiya, despite earlier attempts to dislodge him by Ibn Ziyad in 685/86 and the caliph's governor in Homs, Aban ibn al-Walid ibn Uqba, in 689/90, remained an obstacle to the caliph's ambitions in Iraq. In revenge for Umayr's slaying, Zufar had intensified his raids and inflicted heavy casualties on the caliph's tribal allies in the Jazira. Abd al-Malik resolved to command the siege of al-Qarqisiya in person in the summer of 691, and ultimately secured the defection of Zufar and the pro-Zubayrid Qays in return for privileged positions in the Umayyad court and army. The integration of the Qaysi rebels strongly reinforced the Syrian army, and Umayyad authority was restored in the Jazira. From then onward, Abd al-Malik and his immediate successors attempted to balance the interests of the Qays and Yaman in the Umayyad court and army. This represented a break from the preceding seven years, during which the Yaman, and particularly the Kalb, were the dominant force of the army.