The siege of Barletta (August 1502-April 1503) saw a French army under the Duke of Nemours loosely blockade a smaller Spanish army under Gonzalo Fernández de Córdoba in the port of Barletta in Apulia, but the French failed to press their advantage before Cordoba was reinforced (Second Italian War/ Italian War of Louis XII).
In November 1500 Louis XII of France and Ferdinand II of Aragon signed the Treaty of Granada, in which the agreed to split the Kingdom of Naples between them.
Both sides sent armies into Naples. The Spanish sent around 4,000 men under Gonzalo Fernández de Córdoba. He spent the later part of 1501 and the first part of 1502 besieging Taranto, which finally fell in March 1502 after he moved a fleet onto a lake behind the city. Soon after this the allies fell out over the exact split of their loot, with open fighting starting in July 1502. The French had the initial advantage, moving 10,000 men under Louis d'Armagnac, Duke of Nemours into Naples. Cordoba was badly outnumbered, and in August 1502 he pulled back into the port of Barletta in Apulia (the Spanish also kept hold of Taranto).
The French missed their chance to eliminate the Spanish presence while they had the numerical advantage. The blockade of Barletta was only loosely enforced, and the long siege was punctuated by a series of duels and tournaments between the two sides (Pierre de Bayard was the most enthusiastic French participant in these activates). One of the most famous of these tournaments was a fight between 13 French and 13 Italian knights, won by the Italians. In addition part of the army, under Bernard Stuart, Seigneur d'Aubigny, was sent into Calabria.
In April 1503 Cordoba was reinforced by around 6,000 Spanish troops who arrived by sea. He decided to go onto the offensive, and moved out of the port, taking up a new position at Cerignola. On 26 April the French attacked but were repulsed. Cordoba then counterattacked and the French army was defeated (battle of Cerignola). Nemours was killed in the battle, and the French position in Naples began to collapse. Aubigny's army in Calabria had been defeated (Second battle of Seminara, 21 April 1503) and the French were forced to retreat north.