By the mid-ninth century, al-Gharb had become a Moorish kingdom, with a capital at Chelb, or Silves, (see page 107).
The Moors rose to power around 850.