Tony Blair's term as the prime minister of the United Kingdom began on 2 May 1997 when he accepted an invitation of Queen Elizabeth II to form a government, succeeding John Major of the Conservative Party, and ended on 27 June 2007 upon his resignation. While serving as prime minister, Blair also served as the first lord of the treasury, minister for the civil service and leader of the Labour Party.