Following the defeat of the campaign for Scottish independence in a 2014 referendum, then First Minister Alex Salmond, who had arranged the referendum, announced that he would resign as Scottish National Party leader and first minister after a new leader was chosen. Deputy First Minister Nicola Sturgeon took the leadership unopposed at the SNP's annual conference on 14 November 2014. This also effectively made her First Minister-designate, given the SNP's outright majority in the Scottish Parliament. She was elected to succeed Salmond as First Minister by the Scottish Parliament on 19 November, and formally appointed by Queen Elizabeth II on the next day.