Less than five of the nine last UK Prime Ministers have gotten their position after winning an election as of October 31 , 2019 .
As at 25 July 2019 , four of the nine last prime ministers have attained office as the immediate result of a general election ; the others have gained office upon the resignation of a prime minister of their own party .