List of prime ministers of the United Kingdom

The prime minister of the United Kingdom is the principal minister of the crown of His Majesty's Government, and the head of the British Cabinet.
There is no specific date for when the office of prime minister first appeared, as the role was not created but rather evolved over time through a merger of duties. The term was regularly, if informally, used by Robert Walpole by the 1730s. It was used in the House of Commons as early as 1805, and it was certainly in parliamentary use by the 1880s, although did not become the official title until 1905, when Arthur Balfour was prime minister.
Historians generally consider Robert Walpole, who led the government of the Kingdom of Great Britain for over twenty years from 1721, to be the first prime minister. Walpole is also the longest-serving British prime minister by this definition. The first prime minister of the United Kingdom of Great Britain and Ireland was William Pitt the Younger at its creation on 1 January 1801. The first to use the title in an official act was Benjamin Disraeli who signed the 1878 Treaty of Berlin as "Prime Minister of Her Britannic Majesty".
In 1905, the post of prime minister was officially given recognition in the order of precedence, with the incumbent Henry Campbell-Bannerman the first officially referred to as "prime minister". The first prime minister of the current United Kingdom of Great Britain and Northern Ireland upon its creation in 1922 (when 26 Irish counties seceded and created the Irish Free State) was Andrew Bonar Law, although the country was not renamed officially until 1927, when Stanley Baldwin was the serving prime minister.
The incumbent prime minister is Keir Starmer, who assumed the office on 5 July 2024. There are currently eight living former prime ministers. The most recent former prime minister to die was Margaret Thatcher, on 8 April 2013.
Before the Union of England and Scotland in 1707, the Treasury of England was led by the Lord High Treasurer. By the late Tudor period, the Lord High Treasurer was regarded as one of the Great Officers of State, and was often (though not always) the dominant figure in government: Edward Seymour, 1st Duke of Somerset (lord high treasurer, 1547–1549), served as lord protector to his young nephew King Edward VI; William Cecil, 1st Baron Burghley (lord high treasurer, 1572–1598), was the dominant minister to Queen Elizabeth I; Burghley's son Robert Cecil, 1st Earl of Salisbury, succeeded his father as Chief Minister to Elizabeth (1598–1603) and was eventually appointed by King James I as lord high treasurer (1608–1612).
By the late Stuart period, the Treasury was often run not by a single individual (i.e., the lord high treasurer) but by a commission of lords of the Treasury, led by the first lord of the Treasury. The last lords high treasurer, Sidney Godolphin, 1st Earl of Godolphin (1702–1710) and Robert Harley, 1st Earl of Oxford (1711–1714), ran the government of Queen Anne.
Following the succession of George I in 1714, the arrangement of a commission of lords of the Treasury (as opposed to a single lord high treasurer) became permanent. For the next three years, the government was headed by Charles Townshend, 2nd Viscount Townshend, who was appointed Secretary of State for the Northern Department. Subsequently, Lords Stanhope and Sunderland ran the government jointly, with Stanhope managing foreign affairs and Sunderland domestic. Stanhope died in February 1721 and Sunderland resigned two months later; Townshend and Robert Walpole were then invited to form the next government. From that point, the holder of the office of first lord also usually (albeit unofficially) held the status of prime minister. It was not until the Edwardian era that the title prime minister was constitutionally recognised. The prime minister still holds the office of first lord by constitutional convention, the only exceptions being the Earl of Chatham and the Marquess of Salisbury.
Due to the gradual evolution of the post of prime minister, the title is applied to early prime ministers only retrospectively; this has sometimes given rise to academic dispute. William Pulteney, 1st Earl of Bath and James Waldegrave, 2nd Earl Waldegrave are sometimes listed as prime ministers. Bath was invited to form a ministry by George II when Henry Pelham resigned in 1746, as was Waldegrave in 1757 after the dismissal of William Pitt the Elder, who dominated the affairs of government during the Seven Years' War. Neither was able to command sufficient parliamentary support to form a government; Bath stepped down after two days and Waldegrave after four. Modern academic consensus does not consider either man to have held office as prime minister; they are therefore listed separately.