Ifriqiya under the Abbasids was known to be a difficult region to rule. Nasr b. Habiib, the advisor to the emir at the time, wrote of his concerns with governing the region to the caliph saying "...Ifriqiya is a large frontier zone which would not be safe without a strong ruler." There were many reasons for this. Two of the most pressing were the jund and the Berbers. At the start of Ziyadat Allah's rule in 817, the Abbasid Caliphate was still in a state of strife and uncertainty with no caliph in Baghdad. This caused many of the outer provinces, like Ifriqiya, to their own devices. The Aghlabids, now on their own, had to maintain control of the region as independent rulers. The biggest threat posed was the maintenance of the jund, a military force in Ifriqiya that likely numbered over 100,000. The jund had engaged in multiple insurrections since 765 and were a constant threat to governors of Ifriqiya. When Ifriqiya was under control of the Abbasid Caliphate other provinces like
Egypt would sometimes provide support. This helped to decrease the frequency that the jund went unpaid which was likely the cause of their rebellions. However, with the Aghlabid governor Ziyadat Allah now independent of the caliphate and independent of the financial support of the empire. This jund were not the only cause for concern in Ifriqiya. The indigenous Berber tribes had been another source of rebellion and undermined Abbasid authority in the region. During the Abbasid reconquest of Ifriqiya in 763 many of the towns recaptured had to be wrestled from the control of
Ibadi militants, a sect now largely subscribed to by the Berbers. The Berbers were such a threat to the control of emirs in the region that by 770 the emir of Ifriqiya recognized the authority of the Berber-Ibadis over the hinterlands of Ifriqiya. In other regions of
North Africa, like Northern
Morocco which was ruled by the Idrisids starting in 789 through the time of Ziyadat Allah, the rulers were able to maintain control more consistently and effectively due to strong relationships with the local Berber populations. It would seem that the lack of this relationship in Ifriqiya may have resulted from the Abbasid's enslavement of Berbers which continued to some extent even under the Aghlabids. Another cause is the nature of the Berbers when compared to other conquered groups. They were largely armed and accustomed to warfare and therefore more inclined to wage it. Regardless of the cause, it undermined the ability of emirs to maintain a positive relationship with the group. Ziyadat Allah inherited these issues upon the passing of his brother '
Abd Allah in 817. Unlike his predecessors he was able to rely on an improved relationship with the Berbers and external exploits to solve the issue of the jund once and for all leading to a more stable rule. == Historiography ==