The battle of Cerignola (26 April 1503) was the first great victory for Gonzalo Fernández de Córdoba (El Gran Capitán) and forced the French to abandon the city of Naples (Second Italian War/ Italian War of Louis XII).
In the summer of 1501 France and Spain had launched a joint invasion of Naples under the terms of the Treaty of Granada (November 1500). The French occupied the north of the country, while the Spanish got Calabria in the far south and Apulia in the heel of Italy. The Spanish army was commanded by Gonzalo Fernández de Córdoba (El Gran Capitán), who spent the winter of 1501-2 successfully besieging Taranto.
The city fell in March 1502, but Cordoba didn't have long to enjoy his conquests. The treaty hadn't been entirely clear on the division of the spoils and there were a series of minor clashes in the border areas, before open warfare finally broke out in July 1502.
At the start of the war the French had the numerical advantage, but they wasted it. One army, under, Bernard Stuart, Seigneur of Aubigny, was sent south into Calabria, while the main army, 10,000 strong, commanded by Louis d'Armagnac, Duke of Nemours, attacked Cordoba in Apulia. Cordoba was forced out of Cerignola and Canosa, and blockaded in Barletta on the north coast of Apulia (siege of Barletta, August 1502-April 1503).
The French didn't press the siege with any vigour. Instead their time was taken up with frequent tournaments between the lines, and the capture of minor fortresses. Cordoba received provisions from Venice, allowing him to hold out until reinforcements arrived.
The first Spanish reinforcements landed at Reggio at the tip of Calabria in March 1503. This force defeated Aubigny at the second battle of Seminara (21 April 1503), a victory that is sometimes said to have influenced Cordoba's decision to go onto the offensive in Apulia, although there was only a five day gap between the two battles, perhaps not long enough for the news to travel around the south coast of Italy.
More importantly Cordoba received reinforcements himself - 3,000 Landsknechts send from Trieste by the Emperor Maximilian (some sources give a figure of 6,000 reinforcements, which could include other troop types).
Cordoba decided to go onto the offensive. The blockade of Barletta was very loose, and he was able to march out of Barletta and take up a position on a hill fifteen miles inland at Cerignola. There he built a defensive position supported by a ditch and palisade.
Nemours held a council of war to decide how to respond to this bold move. Nemours suggested waiting for the next day to attack, to give his men time to scout out the new Spanish position, but when some of his subordinates accused him of cowardice and disloyalty he was angered and ordered a rash immediate attack.
The resulting battle was one of the first to be decided by the hand gun. The initial French attack was made by a mix of heavy cavalry and Swiss pikemen, supported by heavy artillery fire, a lethal combination on the battlefields of this period. Early in the battle Cordoba's artillery was rendered useless by an explosion in the powder supply, but the French attack was repulsed by the Spanish arquebusiers in their fortified positions. Nemours was killed by a bullet during the attack, probably making him the first general in history to be killed by a hand gun.
After the repulse of the French attack Cordoba ordered a counterattack. This was a success, and the French were driven off the field.
The French were forced to retreat back across Italy towards Naples, but they then abandoned the city and moved further north up the coast to Gaeta. Cordoba occupied the city of Naples on 13 May 1503. Some of his troops were used to capture the castles immediately around Naples (including the strong castle of Uovo, captured after a gunpowder mine was exploded under the chapel on 26 June 1503, killing the governor and his council). Most of the army moved north to besiege Gaeta (June-October 1503). This time the Spanish were held up for too long, allowing the French to rush reinforcements to the area. Cordoba was forced back to the Garigliano River, just south of Gaeta, where a long stand-off developed. Once again this ended when Corboda received reinforcements, went onto the offensive, and defeated the French again at the battle of the Garigliano (28-29 December 1503), effectively ending the French presence in Naples.