 It was Abd al-Rahman al-Fihri, the Abbasid governor of Ifriqiya, who first made plans to invade the island in force and attempt to capture it and Sardinia in 752–753, but he was thwarted by a Berber rebellion.In 799, the founder of the Aghlabid dynasty, Ibrahim ibn al-Aghlab, secured recognition of his position as autonomous emir of Ifriqiya by the Abbasid caliph, Harun al-Rashid, thereby marking the establishment of a practically independent state centred on modern Tunisia.In 805, Ibrahim concluded a ten-year truce with the Byzantine governor of Sicily, which was renewed by Ibrahim's son and successor Abdallah I in 813.