3 th ▁century ▁on wards ▁the ▁country ▁saw ▁a ▁massive ▁migration ▁of ▁the ▁Ban u ▁Hil al ▁Arab ▁tribes . ▁In ▁the ▁ 1 3 th ▁and ▁ 1 4 th ▁centuries ▁the ▁Mer in ids ▁held ▁power ▁in ▁Mor oc co ▁and ▁stro ve ▁to ▁rep licate ▁the ▁success es ▁of ▁the ▁Al m oh ads ▁by ▁military ▁campaign s ▁in ▁Al ger ia ▁and ▁Spain . ▁They ▁were ▁followed ▁by ▁the ▁W att as ids . ▁In ▁the ▁ 1 5 th ▁century , ▁the ▁Re con qu ista ▁ended ▁Muslim ▁rule ▁in ▁central ▁and ▁southern ▁Spain ▁and ▁many ▁Muslim s ▁and ▁Jews ▁fled ▁to ▁Mor oc co . ▁ ▁Portuguese ▁efforts ▁to ▁control ▁the ▁Atlantic ▁sea ▁trade ▁in ▁the ▁ 1 5 th ▁century ▁did ▁not ▁greatly ▁affect ▁the ▁interior ▁of ▁Mor oc co ▁even ▁though ▁they ▁managed ▁to ▁control ▁some ▁poss essions ▁on ▁the ▁Mor oc can ▁coast ▁but ▁not ▁vent uring ▁further ▁af ield ▁in land . ▁ ▁Early ▁modern ▁period ▁ ▁In ▁ 1 5 4 9 , ▁the ▁region ▁fell ▁to ▁success ive ▁Arab ▁dynast ies ▁claim ing ▁descent ▁from ▁the ▁Islam ic ▁proph et , ▁Muhammad : ▁first ▁the ▁Sa adi ▁dynast y ▁who ▁ruled ▁from ▁ 1 5 4 9 ▁to ▁ 1 6 5 9 , ▁and ▁then ▁the ▁A la ou ite ▁dynast y , ▁who ▁remain ▁in ▁power ▁since ▁the ▁ 1 7 th ▁century . ▁ ▁Under ▁the ▁Sa adi ▁dynast y , ▁the ▁country ▁rep uls ed ▁Ott oman