how long can a uk government remain in office before they have to hold a general election
Elections in the United Kingdom A general election must take place before each parliamentary term begins. Since the maximum term of a parliament is five years, the interval between successive general elections can exceed that period by no more than the combined length of the election campaign and the time for the new parliament to assemble (a total of typically around four weeks). The five years runs from the first meeting of Parliament following the election.
Records of Prime Ministers of the United Kingdom The Prime Minister with the longest single term was Sir Robert Walpole, lasting 20 years and 314 days from 4 April 1721 until 11 February 1742. This is also longer than the accumulated terms of any other Prime Minister.