The battle of Perpignan (17 July 1793) was the first significant Spanish failure during their campaign at the eastern end of the Pyrenees during the War of the Convention. In April a Spanish army under General Ricardós crossed the mountains, and on 20 April they forced the French to abandon Ceret. Ricardós was a cautious general, and instead of advancing on Perpignan while the town was weakly defended he decided to wait for reinforces. When they arrived he advanced towards the city and drove the French out of their fortified camp at Mas-d'Ru, seven miles outside the city, but once again he missed a chance to capture the city, and instead turned back south and wasted a month capturing the remaining French fortresses in the Tech valley. Only after the fall of Bellegarde on 25 June did Ricardós turn north and attempt to capture Perpignan.
The Spanish planned to attack in five columns, with the intention of completely surrounding the city. The first column, on the right, was to advance to Cabestany, south-east of Perpignan. The second column, under the Marquis de Las Maraillas, was to attack Orles, three miles to the south-west of the city, advancing via Nyles and Canohoes. The third column was to advance to Pezilla, on the River Tet west of Perpignan, from Truillas and Thuir. The fourth and fifth columns were both sent to cross the Tet at Millas, ten miles to the west. The fourth column was then to advance east to Saint-Estéve, just to the west of the city, while the fifth column, under General La Union, was to advance north-east to capture the bridge over the L'Agly at Rivesaltes and to block the coast road at Salses-le-Chateau. In total the Spanish had around 15,000 men to make their attack.
At the start of the campaign most of the defenders of Perpignan had been inexperienced new recruits, but since then the commander of the Army of the Eastern Pyrenees, General Charles de Flers, had concentrated on training his men, and on building fortifications around the city. By the time the Spanish attacked Flers had made sure that most of his men would be able to fight behind fortifications. Although he didn't have many guns, those that were available were manned by experienced gunners from the many coastal fortifications in the area.
The Spanish plan had the same flaw as many Austrian plans of the same period. The five columns were too far apart to support each other, so even if they had all arrived at their intended destinations the French would still have been defeat them in detail. At first things went well, as the Spaniards pushed back the French outposts. The third column captured some heights to the west of the city, and set up some artillery, but the second column, which was meant to support them, failed to arrive. Flers had been waiting for a chance to turn on one of the isolated Spanish columns, and he now led an attack on the third column, which was pushed back in some disorder. General La Union, whose column had not made much progress, turned back and temporarily restored the situation, but Flers led a counterattack and the Spanish columns broke and fled.
Ricardós lost 1,000 men in the failed attack on Perpignan, and abandoned any idea of attempting to storm the French defences. Instead he decided to surround the city with a series of fortified camps, and attempt to conduct a regular siege. The French also abandoned any idea of mounting a major offensive in the area, and for some time the fighting at the eastern end of the Pyrenees stagnated.