<P> William's and Anne's experiments with the political composition of the Cabinet illustrated the strengths of one party government and the weaknesses of coalition and minority governments . Nevertheless, it was not until the 1830s that the constitutional convention was established that the Sovereign must select the Prime Minister (and Cabinet) from the party whose views reflect those of the majority in Parliament . Since then, most ministries have reflected this one party rule . </P> <P> Despite the "one party" convention, Prime Ministers may still be called upon to lead either minority or coalition governments . A minority government may be formed as a result of a "hung parliament" in which no single party commands a majority in the House of Commons after a general election or the death, resignation or defection of existing members . By convention the serving Prime Minister is given the first opportunity to reach agreements that will allow them to survive a vote of confidence in the House and continue to govern . The last minority government was led by Labour Prime Minister Harold Wilson for eight months after the February 1974 general election produced a hung parliament . In the October 1974 general election, the Labour Party gained 18 seats, giving Wilson a majority of three . </P> <P> A hung parliament may also lead to the formation of a coalition government in which two or more parties negotiate a joint programme to command a majority in the Commons . Coalitions have also been formed during times of national crisis such as war . Under such circumstances, the parties agree to temporarily set aside their political differences and to unite to face the national crisis . Coalitions are rare: since 1721, there have been fewer than a dozen . </P> <P> When the general election of 2010 produced a hung parliament, the Conservative and Liberal Democrat parties agreed to form the Cameron--Clegg coalition, the first coalition in seventy years . The previous coalition in the UK before 2010 was led by Conservative Prime Minister Winston Churchill during most of the Second World War, from May 1940 to May 1945 . Clement Attlee, the leader of the Labour Party, served as deputy Prime Minister . After the general election of 2015, the nation returned to one party government after the Tories won an outright majority . </P>

Who elects the prime minister in great britain