One way to better understand the story is to read widely in time and in the surrounding context. Here the case of Tamazgha (North Africa) in key dates:
Année : 1228 Evénement : Le hafside Abou Zakaria se fait reconnaître souverain de Bgayet qui devient dépendante du gouvernement de Tunis.