Algeria was divided by the emir into eight khalifalik, themselves subdivided into aghalik, which grouped several qaidat. This division took into account local influences and history, especially on the tribal level.[6]