During the first half of the seventeenth century and at the beginning of the Alawites rule in Morocco, the Ottoman Empire was the major religious, political, and military force. The Dila'ites then was controlling parts of northern Morocco, until they were expelled from Morocco in 1668. The Dila'ites won the Ottomans’ sympathy and stayed in their empire.