The Battle of Alcácer Quibir (also known as "Battle of Three Kings" (Arabic: معركة الملوك الثلاثة) or "Battle of Wadi al-Makhazin" (Arabic: معركة وادي المخازن) in Morocco) was fought in northern Morocco, near the town of Ksar-el-Kebir (variant spellings: Ksar El Kebir, Alcácer-Quivir, Alcazarquivir, Alcassar, etc.) and Larache, on 4 August 1578.
The combatants were the army of the deposed Moroccan Sultan Abu Abdallah Mohammed II, with his ally, the King of Portugal Sebastian I, against a large Moroccan army under the new Sultan of Morocco (and uncle of Abu Abdallah Mohammed II) Abd Al-Malik I.
The Christian king, Sebastian I, had planned a crusade after Abu Abdallah asked him to help recover his throne. Abu Abdallah's uncle, Abd Al-Malik, had taken it from him with Ottoman support. The defeat of Portugal and disappearance of the childless Sebastian led to the end of the Aviz dynasty, and the integration of the country in the Iberian Union for 60 years under the Philippine Dynasty in a dynastic union with Spain.