Abū Ḥafṣ ibn ʿAmr (Arabic: أبو حفص بن عمرو; Greek: Ἀπόχαψ, Apochaps) was the last Arab emir of Malatya (Melitene) before its reconquest by the Byzantine Empire in 934.
Abu Hafs was the grandson of the famous emir Umar ibn Abdallah al-Aqta (his name is also transcribed as Amr ibn Ubaydallah), who was the ruler of the city of Malatya from the 830s until his death at the Battle of Lalakaon in 863. Under Umar, Malatya had been one of the most important emirates on the border zone (thughur) between the Abbasid Caliphate and the Byzantine Empire, and Umar himself had been one of the most active Muslim leaders in the perennial raids and counter-raids that characterized the Arab–Byzantine wars. The disastrous defeat at Lalakaon, however, shattered Malatya's power, and signalled the beginning of a gradual Byzantine advance in the borderlands. Over the next few decades, the emirate's Paulician allies and their principality at Tephrike were defeated and annexed, and a string of fortresses, often manned by Armenians, occupied the hill country around the city. From 927 on, with their other frontiers secure, the Byzantines, under the leadership of general John Kourkouas, concentrated their resources against the Arabs. First attempts to capture Malatya in 927 and 928 failed, but Byzantine troops, based on the fortresses surrounding the city, repeatedly ravaged its countryside and cut it off from assistance.
Abu Hafs was the emir of the city during Kourkouas' attacks. In spring/summer 931, Kourkouas launched another assault on Malatya and besieged it. Abu Hafs and his garrison commander, Abu as-Salt, entered into negotiations with Kourkouas, who sent them on to Emperor Romanos I Lekapenos in Constantinople. The emperor received the embassy with honours and courtesy, and allowed the emir to keep his autonomy, in exchange for becoming a Byzantine tributary vassal and having to provide troops to march alongside the Byzantines against the other Arab principalities of the region. Abu Hafs died soon after, however, and, aided by Abbasid troops under Sa'id ibn Hamdan, who entered the city in November 931, the citizens of Malatya renounced the treaty. Kourkouas and his Armenian lieutenant, Melias, resumed their attacks, and the city finally fell on 19 May 934. The city's inhabitants were ordered to either convert to Christianity or leave, and Malatya was annexed to the Byzantine Empire.
The exact chronology of events is unclear in the sources; the date of 931 for Kourkouas' first submission of the city is given by Ibn al-Athir, while the Byzantine chroniclers are less precise. As a result, some historians, like Steven Runciman and Warren Treadgold, place the first submission of the city after the first attacks in 927/928, and Abu Hafs' death likewise around that date.