In July 2016, Theresa May became Prime Minister of the United Kingdom, having taken over from David Cameron (who had resigned in the wake of the 2016 Brexit referendum). Her party the Conservative and Unionist Party had governed the UK since the 2010 general election, initially in coalition with the Liberal Democrats and after the 2015 general election, alone with a small majority. In the 2017 general election, May lost her majority but was able to resume office as a result of a confidence and supply agreement with Northern Ireland's Democratic Unionist Party. In the face of opposition from the DUP and Conservative back-benchers, the second May ministry was unable to pass its Brexit withdrawal agreement by 29 March 2019, so some political commentators considered that an early United Kingdom general election was likely. The opposition Labour Party called for a January 2019 vote of confidence in the May ministry, but the motion failed. May resigned after her party's poor performance in the 2019 European Parliament election, during the first extension granted by the European Union for negotiations on the withdrawal agreement. Boris Johnson won the 2019 Conservative Party leadership election and became Prime Minister on 23 July 2019. Along with attempting to revise the withdrawal agreement arranged by his predecessor's negotiations, Johnson made three attempts to hold a snap election under the process defined in the Fixed-term Parliaments Act 2011, which requires a two-thirds supermajority in order for an election to take place.