When Morocco Almost Became a Portuguese Colony

By: Mehdi El Merini / Arab America Contributing Writer
Throughout the 16th century, European powers expanded their colonial ambitions, seeking new territories in Africa and beyond. While Spain had already established a foothold in parts of Morocco, Portugal, under King Sebastian I, aimed to extend its control over the country. This ambition culminated in the Battle of the Three Kings in 1578, a pivotal moment in Moroccan and Portuguese history. The battle not only marked a turning point for both nations but also had lasting consequences on the power dynamics of North Africa and Europe. Had the Portuguese succeeded, Morocco might have become a European colony far earlier than the 20th century.
The Origins of the Conflict
By the mid-16th century, Portugal had already established numerous fortified coastal settlements along Morocco’s Atlantic coastline, including Ceuta, Tangier, and Mazagan (modern-day El Jadida). These outposts were part of Portugal’s broader strategy to control trade routes and expand its influence in Africa. However, Portuguese ambitions were largely restricted to the coast, as they lacked control over Morocco’s interior.
At the same time, Morocco was in the midst of a political crisis. After the death of Sultan Abdallah al-Ghalib of the Saadian dynasty, a power struggle erupted between his son, Muhammad al-Mutawakkil, and his uncle, Abu Marwan Abd al-Malik. Al-Mutawakkil, having been deposed, sought foreign assistance to reclaim his throne. Seeing an opportunity to expand Christian rule in North Africa, King Sebastian I of Portugal agreed to support al-Mutawakkil and launched an ambitious military expedition into Morocco.
Sebastian believed that this invasion would not only install a pro-Portuguese ruler but also pave the way for a permanent Portuguese colony in Morocco. Inspired by religious zeal and imperial ambition, he assembled a large army, which included Portuguese soldiers, Spanish and Italian mercenaries, and even volunteers from other European nations.

The Battle of the Three Kings: A Catastrophic Defeat
In July 1578, King Sebastian and his forces landed in Morocco and began their march toward the interior. However, they underestimated the military capabilities of the Saadian dynasty. Abu Marwan Abd al-Malik, now the reigning sultan, had consolidated his power and prepared a formidable army to resist the invasion.
The decisive battle took place on August 4, 1578, near the town of Ksar el-Kebir, also known as Alcácer Quibir in Portuguese. The confrontation became known as the Battle of the Three Kings because all three rulers, Sebastian of Portugal, Muhammad al-Mutawakkil, and Abd al-Malik were present on the battlefield and would not survive the battle.
The Moroccan forces, numbering around 50,000, were highly disciplined and well-equipped with gunpowder weapons, cavalry, and skilled military leadership. In contrast, Sebastian’s army, although powerful, was unfamiliar with the harsh terrain and lacked coordination. The battle quickly turned into a disaster for the Portuguese. Abd al-Malik died of illness during the battle, but before his death, he instructed his generals to keep his passing a secret to maintain morale. Moroccan forces overwhelmed the Portuguese troops, surrounding and annihilating them.
King Sebastian was killed in the fighting, and his army was decimated. Only a few hundred Portuguese soldiers managed to escape, while thousands were either slaughtered or captured and ransomed. The deposed Moroccan ruler, Muhammad al-Mutawakkil, also drowned in the chaos, making it one of the rare battles in history where all three leaders perished.

The Aftermath: A Shift in Power
The defeat at Ksar el-Kebir had devastating consequences for Portugal. With no direct heir to the throne, the Portuguese kingdom fell into a succession crisis. Two years later, in 1580, Spain took advantage of Portugal’s weakness and annexed the country, leading to a 60-year period of Iberian Union under Spanish rule. What had been intended as a grand imperial conquest turned into the loss of Portugal’s independence.
For Morocco, the victory solidified Saadian rule and prevented European colonialism from taking root in the country for centuries. Abd al-Malik’s successor, Ahmad al-Mansur, used the victory to consolidate his power and expand Moroccan influence. Under his rule, Morocco entered a golden age, marked by military campaigns into West Africa, including the conquest of Timbuktu in 1591.
Furthermore, the battle reinforced Morocco’s reputation as a strong and independent Islamic power. Unlike Algeria and Tunisia, which later fell under Ottoman control, Morocco maintained its sovereignty, balancing diplomatic ties with both European and Ottoman powers.

Why Morocco Did Not Become a Portuguese Colony
The Battle of the Three Kings was one of the most critical moments in Moroccan history. One of the key reasons Morocco avoided becoming a Portuguese colony was the strength of the Saadian dynasty’s military. The Moroccan army was well-organized, battle-hardened, and equipped with gunpowder weapons, allowing it to effectively counter European military tactics. In addition to military power, strategic leadership played a crucial role in resisting foreign invasions. Moroccan rulers demonstrated diplomatic skill, balancing relations between European and Ottoman powers while ensuring their kingdom remained independent. Geography also worked in Morocco’s favor. Unlike the coastal regions that fell under Portuguese control, Morocco’s rugged interior, with its mountains and deserts, made large-scale European invasions logistically difficult. Broader European political shifts also contributed to Portugal’s failure. The catastrophic defeat at Ksar el-Kebir significantly weakened Portugal’s empire, and just two years later, the country was absorbed into Spain. This shift in power diverted European attention away from Morocco, preventing further attempts at colonization during this period.
Had Portugal succeeded in its invasion, Morocco could have followed a colonial trajectory similar to other African nations. However, its decisive victory ensured that it remained one of the few African countries to resist European domination for centuries.
A Defining Moment in Moroccan History
The Battle of the Three Kings was far more than a single military engagement, it was a defining moment that shaped Morocco’s future. The crushing defeat of the Portuguese not only preserved Moroccan sovereignty but also altered the course of European colonial ambitions in North Africa. While Portugal retained control over a few coastal enclaves, it never again attempted to conquer Morocco’s interior.
For Portugal, the battle was a disaster that contributed to the loss of its independence to Spain, marking the decline of its imperial ambitions. For Morocco, it was a symbol of resilience, one that demonstrated its ability to resist European conquest long before the age of colonization. Even today, the victory at Ksar el-Kebir remains a point of national pride in Morocco, commemorating a moment when the country stood firm against one of Europe’s great powers.
Want more articles like this? Sign up for our e-newsletter!
Check our blog here!