delivered on 3 April 1806 in favour of limited service as a preventive of desertion. Graham applied to have his temporary military rank made permanent, urging among other claims that his regiment represented a loss of 10,000l.; but much unwillingness was shown by the Horse Guards authorities to meet his views, on the plea of the king's just dislike to prefer officers who had not passed through the lower grades, a dislike perhaps not lessened in Graham's case by his whig politics. The change is said to have been made at last in deference to the wishes of Sir John Moore. Graham accompanied Moore as aide-de-camp to Sweden in 1808, and afterwards to Spain. He was in the Corunna retreat, and was one of the few actually present at Moore's death and burial.
In 1809 Graham received permanent rank as major-general, and commanded a brigade in the Walcheren expedition and at the siege of Flushing, but was invalided home. In 1810 he was appointed from home to succeed General Sherbrooke in Portugal (Gurwood, iii. 793), and was sent to Cadiz, with the rank of lieutenant-general, to assume command of the British troops aiding in the defence of that place against the French (ib. iii. 805). In February 1811 he embarked from the Isla with an expeditionary force to attack the rear of the French blockading army, and on 5 March 1811 obtained a memorable victory over the French at Barossa, the results of which were neutralised by the gross misconduct of the Spaniards (ib. iv. 696–7). The historian Napier writes: ‘All the passages in this extraordinary battle were so broadly marked that observations on it would be useless. The contemptible feebleness of Lapena furnished a striking contrast to the heroic vigour of Graham, whose attack was an inspiration rather than a resolution, so wise, so sudden was the decision, so swift, so conclusive was the execution. … In Cadiz violent disputes arose. Lapena, in an address to the Cortes, claimed the victory for himself. He affirmed that all the previous arrangements were made with the knowledge of the English general, and the latter's retreat into the Isla he indicated as the real cause of failure. Lasoy and General Cruz-Murgeon also published inaccurate accounts of the action, and even had plans engraved to uphold their statements. Graham, stung by these unworthy proceedings, exposed the conduct of Lapena in a letter to the British envoy (H. Wellesley), and when Lasoy let fall some expressions personally offensive, he enforced an apology with his sword; but having thus shown himself superior to his opponents at all points, the gallant old man soon afterwards relinquished his command to General Cooke, and joined Lord Wellington's army’ (Hist. Peninsular War, bk. xii. chap. ii.) Graham, who refused a Spanish dukedom (Well. Suppl. Desp. vii. 82), was ordered to join Wellington in June 1811 (Gurwood, v. 42, 111). His seniority as a lieutenant-general of 25 July 1810 placed him next to Wellington, who appears to have been glad to get him. He was given command of the 1st division, and assisted at the siege and capture of Ciudad Rodrigo in January 1812. His investiture as K.B. took place at Elvas, near Badajos, 12 March 1812. He commanded an army corps composed of the 1st, 6th, and 7th divisions, with two brigades of cavalry, during the final operations against Badajos and during Wellington's advance against the forts of Salamanca. A painful affection of the eyes, aggravated by constant use of the telescope under a vertical sun, obliged him to return to England at the beginning of July 1812. Rejoining Wellington early in 1813, he was placed at the head of the left wing of the army, consisting of forty thousand men, which he commanded at the great battle of Vittoria on 21 June 1813. He subsequently captured Tolosa, where he was wounded (ib. vi. 553–6), and was despatched by Wellington to invest the fortress of St. Sebastian, twenty miles south-west of Bayonne. The place was defended by Emmanuel Rey. Graham besieged and bombarded the place from the beginning of July 1813, and on 24 July attempted to carry it by assault, but was repulsed with heavy loss, and three days later compelled to raise the siege. He resumed it after Wellington's defeat of Soult at the foot of the Pyrenees, became master of the most important outworks on 31 Aug., and on 9 Sept. the citadel surrendered (ib. vi. 576–770). With the left of the army Graham was ordered to cross the Bidassoa, the natural boundary of Biscayan Spain and France, an operation which he successfully accomplished, establishing the British army on French soil on 7 Oct. 1813. Graham's health then obliged him to return home, after handing over his command to Sir John Hope. Some libellous attacks on him appeared in the ‘Duende’ (Elf) and other Spanish journals relative to the conduct of his troops at St. Sebastian (ib. vii. 146–7). Feeling his health improved, Graham, in November 1813, accepted the offer of the command of the troops to be sent to Holland, to co-operate with Bulow's Prussians against Antwerp. He defeated the enemy at Merxem, but failed in a desperate attempt to carry the fortress of Bergen-op-Zoom by assault, on the night of 3 Feb. 1813. ‘Night attacks on good troops are seldom successful,’