The Conquest of Melilla occurred in September 1497, when a Spanish fleet seized the Moroccan city of Melilla.
Plans for the conquest occurred as soon as the Fall of Granada in 1492. Spanish captains Lezcano and Lorenzo Zafra visited the coast of Northern Africa to identify possible locations for the Spanish to overtake, and Melilla identified as a prime candidate. Melilla was however in the Portuguese zone of influence under the terms of the 1479 Treaty of Alcáçovaz. At Tordesillas in 1494, the Portuguese ruler agreed to make an exception and permitted the Spanish to attempt the conquest of Melilla.
The duke[who?] sent Pedro Estopiñán who conquered the city virtually without a fight in 1497, as internal conflicts had depleted it of troops, and its defenses were weakened. The Moroccan Wattasid ruler Muhammad al-Shaykh sent a detachment of cavalrymen to retake control of the city, but they were repulsed by the guns of the Spanish ships.
Morocco would later besiege Melilla without success in 1694-1696 and again in 1774.