The Maranid Sultanate is a country located in North Africa and South Iberia is originally founded by Berbers.
Coming from the Maghreb was made by Moroccan people and the sultan. Their plan was to reconquer Hispania due to the heritage of al-Andalus and the enemy of the Visigoths.
The Hispano-Moroccan War was a war fought between the Spanish forces of allied Aragonese/Neapolitan/Sicilian and Castilian forces against an initial attempt of an invasion of the Iberian Peninsula starting in an assault on Valencia followed by a naval invasion of Ibiza. The resulting conflict once again involving the Great King James in battle resulted in Moroccan Capitulation following the Moroccan Sultanate falling into a state of rebellion. Following the war, Morocco became a de facto puppet state under The Crown of Aragon after supporting Othman Ibn Adris as the new Sultan of Morocco. Following the conflict, The Crown of Aragon officially annexed the northern shore of Morocco officially opening the door for Aragon in the Atlantic and control of trade through the Strait of Gibraltar.