if im not wrong the moors ruled almost spain and portugal entirely for 3 centuries(from 700 till 1000) and after that it went downhill until mid 1400 when they where finaly defeated by the spanish.