<Li> Bottom left: Lloyd George was the last Prime Minister of the United Kingdom of Great Britain and Ireland as a result of the Anglo - Irish Treaty in 1922 . </Li> <Li> Bottom right: Baldwin was Prime Minister when the country was renamed the United Kingdom of Great Britain and Northern Ireland in 1927 . </Li> <P> The Prime Minister of the United Kingdom is the head of the Government of the United Kingdom, and chairs Cabinet meetings . There is no specific date when the office of Prime Minister first appeared, as the role was not created but rather evolved over a period of time through merger of duties . The term was used in the House of Commons in 1805, and it was certainly in parliamentary use by the 1880s . In 1905 the post of Prime Minister was officially given recognition in the order of precedence . Modern historians generally consider Sir Robert Walpole, who led the government of Great Britain from 1721 to 1742, as the first Prime Minister . Walpole is also the longest - serving Prime Minister by this definition . However, Sir Henry Campbell - Bannerman was the first Prime Minister and Margaret Thatcher the longest - serving Prime Minister to have been officially referred to as such . </P> <P> Strictly, the first Prime Minister of the United Kingdom (of Great Britain and Ireland) was William Pitt the Younger . The first Prime Minister of the current United Kingdom (the United Kingdom of Great Britain and Northern Ireland) was David Lloyd George, although the country was not renamed officially until 1927 when Stanley Baldwin was serving as Prime Minister . </P>

Who was the first elected prime minister of britain