▁English ▁in ▁ 1 6 8 4 ▁and ▁drove ▁the ▁Spanish ▁from ▁Lar ache ▁in ▁ 1 6 8 9 . ▁Portuguese ▁abandoned ▁Maz ag ão , ▁their ▁last ▁territory ▁in ▁Mor oc co , ▁in ▁ 1 7 6 9 . ▁However , ▁the ▁Sie ge ▁of ▁Mel illa ▁against ▁the ▁Spanish ▁ended ▁in ▁defeat ▁in ▁ 1 7 7 5 . ▁ ▁Mor oc co ▁was ▁the ▁first ▁nation ▁to ▁recogn ise ▁the ▁fled g ling ▁United ▁States ▁as ▁an ▁independent ▁nation ▁in ▁ 1 7 7 7 . ▁In ▁the ▁beginning ▁of ▁the ▁American ▁Revolution , ▁American ▁merchant ▁ships ▁in ▁the ▁Atlantic ▁Ocean ▁were ▁subject ▁to ▁attack ▁by ▁the ▁Barb ary ▁pir ates . ▁On ▁ 2 0 ▁December ▁ 1 7 7 7 , ▁Mor oc co ' s ▁Sultan ▁Moh ammed ▁III ▁declared ▁that ▁American ▁merchant ▁ships ▁would ▁be ▁under ▁the ▁protection ▁of ▁the ▁s ultan ate ▁and ▁could ▁thus ▁enjoy ▁safe ▁passage . ▁The ▁Mor oc can – American ▁Tre aty ▁of ▁Friend ship , ▁signed ▁in ▁ 1 7 8 6 , ▁stands ▁as ▁the ▁U . S .' s ▁oldest ▁non - bro ken ▁friendship ▁treat y . ▁ ▁French ▁and ▁Spanish ▁prote ctor ates : ▁ 1 9 1 2 ▁to ▁ 1 9 5 6 ▁ ▁As ▁Europe ▁industrial ised , ▁North west ▁Africa ▁was ▁increasing ly ▁pri zed ▁for ▁its ▁potential ▁for ▁colon isation . ▁France ▁showed ▁a ▁strong ▁interest ▁in ▁Mor oc co ▁as ▁early ▁as ▁ 1 8 3 0