Galway sought to take advantage by launching a new offensive in 1707. To counter this, James FitzJames, 1st Duke of Berwick, was appointed commander of Bourbon forces in North-East Spain, a total of 33,000 men, split equally between French and Spanish troops, with a number of exiled Irish regiments. Before beginning his advance on Valencia, Berwick detached 8,000 men to besiege Xàtiva, prompting the Earl of Peterborough, Allied commander in Spain, to consolidate his forces in Catalonia, rather than combine with the 16,500 troops led by Galway and Minas. This left them badly outnumbered when they moved to intercept Berwick. On 22 April, Berwick halted outside the town of Almansa, from where he could threaten supply lines for the Allied garrison in Valencia. The battle The Allies broke camp early on 25 April and reached Almansa after a long and tiring march. Berwick had drawn up his army in two lines, just in front of the town, his infantry in the centre and the French and Spanish cavalry on the wings. Although Galway was clearly outnumbered, he commenced his attack in mid-afternoon after a short artillery exchange. His infantry successfully drove back the Bourbon centre but a gap opened between them and Portuguese troops on the right, under the 63-year-old Marquess of Minas. Seeing this, the Franco-Spanish cavalry attacked; Berwick's account states the Portuguese fought bravely for some time but eventually collapsed and fled. Their retreat was covered by a few squadrons under Das Minas' personal command, including his mistress, who fought dressed as a man and was killed. The Allied centre was now attacked on three sides; using his remaining cavalry, Galway successfully withdrew some of his troops but 13 battalions lost contact with the rest of the army. Pursued by the Spanish cavalry, they took up a defensive position some 8 miles (12 km) from the battlefield but surrendered the next morning; according to Henry Kamen, allied casualties were 4,000 killed or wounded and 3,000 captured, with Franco-Spanish losses around 5,000 killed or wounded. French military historian Périni claimed Franco-Spanish casualties totalled around 2,000 killed or wounded, with the Allies losing 5,000 casualties and 10,000 prisoners, but from a larger force than 16,500 men. Périni also accepts the bulk of the cavalry escaped, some 3,500 men. According to Gaston Bodart, the Franco-Spanish lost 2,000 men from an army of 21,000 and the allies 12,000 men (5,000 killed or