Complex sentence: Under the Maghrawa, who later declared independence from the Cordoban caliphate, the city retained its role as a trade centre, but became a center for Maghrawan government and the Maghrawa campaign against other tribes in Morocco proper.
Split into simpler sentences: Under the Maghrawa, who later declared independence from the Cordoban caliphate, the city retained its role as a trade centre. It also became a center for Maghrawan government and its campaign against other tribes in Morocco proper.