 Khafaja was succeeded by his son Muhammad, elected by the Sicilian army and confirmed by the Aghlabid emir.In contrast to his previous energy, Muhammad was a sedentary governor, preferring to remain in his capital rather than campaign in person.His tenure was furthermore cut short when he was assassinated by his court eunuchs on 27 May 871.