Hafsid dynasty
By 1350, Constantine was virtually independent of the Caliph in Tunis, and from 1351 to 1356, Ahmad fought with the Tunisian branch of the Hafsid dynasty. In 1356, the Marinid sultan Abu Inan Faris deprived him of his possessions, but already in 1357 the sultan returned to Morocco, and Ahmad - to his possessions.