the same year (1809), and the one following he made tours of inspection of the corps that were found quartered in the various provinces and he corrected any defects he noticed and established rules for the functioning of the different branches of the military service. In this way he improved the functioning of the Portuguese Army so that they might face the forces of Napoleon invading the country for the third time. The beneficial results of his efforts were proven at the campaign against Marshal Masséna in particular at the Battle of Buçaco on 27September 1810 where the Portuguese troops played a prominent part, and also in the defence of the Lines of Torres Vedras). The most notable action in which Beresford held independent command occurred in 1811 when a combined Anglo-Portuguese and Spanish army under his command, intercepted a French army commanded by Marshal Soult, who had been ordered by Marshal Auguste de Marmont to move to protect the important Spanish fortress-city of Badajoz. As the French forces retreated from the Lines of Torres Vedras, Beresford marched towards Badajoz, which he laid siege to. Having, however, received notice that Soult was approaching, he lifted the siege and posted his army at Albuera in a defensive position. There he defeated the French forces on 16 May 1811. After the bloody Battle of Albuera the French were forced to retreat, though the siege of Badajoz had to be subsequently abandoned. Meanwhile, on 13 May 1811, he was created Count of Trancoso in Portugal by decree of Prince Regent John. At the beginning of July 1811, Beresford was again in Lisbon, but he was subjected to fits of "nervous breakdowns", as described by Brigadier D'Urban, quarter master general of the Portuguese Army. He recuperated in February 1812 and then joined Wellington in his investment of Ciudad Rodrigo. Once the fortified town had fallen, he went with the army to Alentejo, and participated in the Anglo-Portuguese Siege of Badajoz. After Badajoz had been stormed, along with Wellington he once again took up position on the Águeda, and from there launched the Salamanca campaign. On 22 July 1812, the important Battle of Salamanca was fought, giving the Anglo-Portuguese forces a decisive victory over the French under Marshal Marmont. In the battle Beresford was badly wounded under his left breast while ordering the advance of one of the Portuguese brigades. He retired to Lisbon, had