David Cameron's tenure as Prime Minister of the United Kingdom began on 11 May 2010 when he accepted an invitation of Queen Elizabeth II to form a government, succeeding Gordon Brown of the Labour Party, and ended on 13 July 2016 upon his resignation following the 2016 referendum that favoured Brexit, which he had opposed. As prime minister, Cameron also served simultaneously as First Lord of the Treasury, Minister for the Civil Service, and Leader of the Conservative Party.
Following the 2010 general election, Cameron became prime minister at the head of a coalition government between the Conservatives and Liberal Democrats, as no party had gained an overall majority in the House of Commons for the first time since the February 1974 general election. He appointed Nick Clegg, Leader of the Liberal Democrats, Deputy Prime Minister. Between them, the Conservatives and Liberal Democrats controlled 363 seats in the House of Commons, with a majority of 76 seats.