Around 1647, Moulay Mohammed entered the Moulouya River region, reaching the Ankad Plain. He subjugated the tribes there.[“L” 3] With their support, he conquered, and then subjugated the Beni Znassen who were at that time under Ottoman control. [“L” 2] Returning with booty, he stopped in front of Oujda which was under Ottoman control. Supported by a portion of the population that rejected Ottoman rule, Moulay Mohammed attacked and captured the city, then expelled all Ottoman loyalists from the city.[“L” 3]