In 975 the Byzantine emperor John Tzimisces retook most of Palestine and Syria, leaving only Tripoli in Fatimid control. He aimed to eventually capture Jerusalem, but he died in 976 on his way back to Constantinople, thus staving off the Byzantine threat to the Fatimids. Meanwhile, the Turkish ghulām (plural: ghilmān, meaning soldiers recruited as slaves) Aftakin, a Buyid refugee who had fled an unsuccessful rebellion in Baghdad with his own contingent of Turkish soldiers, became the protector of Damascus. He allied with the Qarmatis and with Arab Bedouin tribes in Syria and invaded Palestine in the spring of 977. Jawhar, once again called into action, repelled their invasion and besieged Damascus. However he suffered a rout during the winter and was forced to hold out in Ascalon against Aftakin. When his Kutama soldiers mutinied in April 978, Caliph al-Aziz himself led an army to relieve him. Instead of returning to Damascus, Aftakin and his Turkish ghilman joined the Fatimid army and became a useful instrument in the Syrian effort.
