Theresa May's term as the prime minister of the United Kingdom began on 13 July 2016, when she accepted an invitation of Queen Elizabeth II to form a government, following the resignation of her predecessor David Cameron in the aftermath of the European Union (EU) membership referendum, and ended with her resignation on 24 July 2019. While serving as prime minister, May also served as the first lord of the treasury, minister for the civil service and leader of the Conservative Party. May's premiership was dominated by Brexit, in particular by her negotiations with the European Union of a Brexit withdrawal agreement, and her attempts to gain Parliamentary approval for this agreement, thereby achieving the departure of the UK from the EU. Other events during May's premiership included terror