wick.’ The latter was publisher of the tory paper, the ‘Glasgow Sentinel,’ which had attacked James Stuart of Dunearn, an active whig, in an article by Sir Alexander Boswell [q. v.] In a duel that followed between Boswell and Stuart, Boswell was mortally wounded; Stuart was tried for murder at the instance of the lord advocate, and Borthwick was arrested on a charge of theft. In defending himself, Rae denied all knowledge of the libels which had appeared in the ‘Glasgow Sentinel,’ but admitted that he had signed a circular recommending that paper, and also that he had subscribed 100l. to another tory paper, the ‘Beacon,’ which had also attacked Stuart. With regard to the proceedings against Borthwick, he maintained that his depute had acted properly in all that he had done. Though Abercromby was defeated by 120 votes to 95 (ib. vii. 1324–73), he again returned to the subject on 3 June 1823, when he moved that the conduct and proceedings of the lord advocate in Borthwick's case ‘were unjust and oppressive.’ In spite of the fact that he had himself given an opinion against the prosecution of Borthwick, Rae declared that ‘he was quite ready to take upon himself the responsibility which might be supposed to attach’ to his depute. On a division the motion was lost by the narrow majority of six votes (ib. ix. 664–90). Rae's connection with the tory press gave rise to a voluminous discussion on the vague and extensive powers of the lord advocate, and a series of articles on the subject, which aroused great interest throughout Scotland, appeared in the ‘Edinburgh Review’ (xxxvi. 174, xxxviii. 226, xxxix. 363, xli. 450).
Notwithstanding previous opposition to a like measure, Rae brought in a bill for appointing criminal juries in Scotland by ballot, which received the royal assent on 20 May 1825, and is sometimes called Lord Melville's Act (6 George IV, c. 22). In the same session was passed an ‘Act for the better regulating of the Forms of Process in the Courts of Law in Scotland’ (6 George IV, c. 120). In the following session a select committee was appointed on Rae's motion to inquire into the state of the Scottish prisons (Parl. Debates, 2nd ser. xv. 45–6). Rae was returned for Harwich at a by-election in May 1827, and spoke in favour of the Roman Catholic Relief Bill on 24 March 1829 (ib. xx. 1419–21). On 1 April 1830 he obtained leave to bring in a Scottish judicature bill, by which the number of the lords ordinary was reduced from fifteen to thirteen, and other changes were made in the court of session (ib. xxiii. 1138–55, 1176). The government subsequently wished to abandon the bill, but when Rae threatened to resign, it was proceeded with, and became law on the last day of the session (11 George IV and 1 William IV, c. 69).
Rae was sworn a member of the privy council on 19 July 1830. He was elected for Buteshire at the general election in August 1830, and resigned office on the downfall of the Duke of Wellington's administration in November following. He represented Portarlington in the parliament of 1831–2. At a by-election in September 1833 he was returned for Buteshire, and continued to represent that county until his death. He was reappointed lord advocate on the formation of Sir Robert Peel's administration in December 1834, and retired from office with the rest of his colleagues on the defeat of the ministry in April 1835. On 5 May 1837 Rae unsuccessfully moved a series of resolutions affirming the necessity for extending ‘the means of religious instruction and pastoral superintendence furnished by the Established Church of Scotland’ (Parl. Debates, 3rd ser. xxxviii. 602–614). On 23 Aug. 1839 he was appointed one of the directors of prisons in Scotland (London Gazette, 1839, pt. ii. p. 1701). In March 1841 he introduced a bill for the erection at Edinburgh of a monument to Sir Walter Scott (Parl. Debates, 3rd ser. lvii. 288). He was reappointed lord advocate on 4 Sept. 1841, in Sir Robert Peel's second administration. He spoke for the last time in the House of Commons on 21 March 1842 (ib. lxi. 932–3). He died at St. Catherine's, near Edinburgh, on 19 Oct. 1842, aged 73, and was buried at Inveresk.
Rae was the intimate friend of Sir Walter Scott, who apostrophised him as ‘Dear loved Rae’ in the introduction to the fourth canto of ‘Marmion.’ He is described by Scott as ‘sensible, cool-headed, and firm, always thinking of his duty, and never of himself’ (Lockhart, Life of Sir Walter Scott, 1839, vi. 140). Rae never attained any eminence as a speaker, either at the bar or in the house. His practice at the bar was never large, and, though he had many opportunities of claiming preferment, he always declined to go on the bench of the court of session. He conducted the prosecution of Andrew Hardie and other persons charged with high treason before the special commission held at Stirling, Glasgow, Dumbarton, Paisley, and Ayr in the summer of 1820 (Reports of State Trials, new ser. 1888, i. 609–784; Trials for High Treason in Scotland, &c., taken in shorthand by C. J. Green, 1825), and was the leading counsel for the crown