The War over Naples was fought by France and Spain between 1502 and 1504. Gonzalo de Córdoba, called El Gran Capitán, distinguished himself for his military skills thanks to his brilliant victories against the French at Cerignola and Garigliano (1503). With the Treaty of Lyon in 1504, the Kingdom of Naples was ceded to Spain, which controlled it for 200 years – until the War of the Spanish Secession.
In November 1500, Ferdinand of Spain and Louis XII of France signed the secret Treaty of Granada. This agreement enabled Spain and France to easily conquer and divide the Kingdom of Naples in the years 1501 and 1502. The treaty divided Naples between the two nations. However, disputes arose over the division and the boundaries of the newly conquered territories that soon led to war.
Gonzalo Fernández de Córdoba, the Spanish Commander in Naples, was aware of the inferior quality of his troops and retreated to Barletta (Apulia). His plan was to await reinforcements from Spain. The French commander, Louis d’Armagnac, Duke of Nemours, split the French army into several garrisons all around Barletta, and sent a contingent led by Beraud d’Aubigny to occupy Calabria. Over the following eight months, skirmishes, ambushes, and sudden attacks, which were to become Córdoba’s trademark tactic, became the norm.
In April 1503, Córdoba, following the arrival of Spanish and Landsknecht reinforcements, left Barletta and moved over to the offensive. The Spanish defeated d’Aubigny’s army on 21 April, and then just over a week later, on the 28th, they defeated the Duke of Nemours at Cerignola. The Duke was to fall in the fighting. Gonzalo de Córdoba and his troops entered Naples in triumph on 16 May 1503.
Louis XII, eager to reclaim his lost territories, gathered an army and invaded Naples. However, the French were defeated again in December 1503, near the river Garigliano. Gaeta, the last French stronghold in Naples, fell on 1 January 1504. On the 31st the Treaty of Lyon was signed, ratifying Spanish possession of the Kingdom of Naples.