The end of Beylerbay rank in Algeria caused it the loss of its political power and control that it had before. This led to direct border dispute and many confrontations between Morocco and Ottomans over the Ottoman ruled territories in North Africa, and mainly for the control of Oujda.