Ardern became a list MP in 2008, a position she held for almost ten years until her election to the Mount Albert electorate in the 2017 by-election, held on 25 February. She was unanimously elected as Deputy Leader of the Labour Party on 1 March 2017, following the resignation of Annette King. Ardern became Leader of the Labour Party on 1 August 2017, after Andrew Little resigned from the position following a historically low poll result for the party. She is credited with increasing her party's rating in opinion polls. In the general election of 23 September 2017, the Labour Party won 46 seats (a net gain of 14), putting it behind the National Party, which won 56 seats. After negotiations with National and Labour, the New Zealand First party chose to enter into a minority coalition government with Labour, supported by the Greens, with Ardern as Prime Minister. Ardern's government has focused particularly on the New Zealand housing crisis, child poverty, and social inequality. In March 2019, she led the country through the aftermath of the Christchurch mosque shootings, and her government introduced strict gun laws in response.