Gillard was first elected to the House of Representatives at the 1998 federal election for the seat of Lalor. Following the 2001 election, she was elected to Shadow Cabinet. When Kevin Rudd was elected as party leader and Leader of the Opposition in December 2006, Gillard was elected unopposed as his deputy. Upon Labor's victory at the 2007 election, she became the first female Deputy Prime Minister of Australia, and was made Minister for Education, Minister for Employment and Workplace Relations and Minister for Social Inclusion. On 24 June 2010, after Rudd lost the support of his party and resigned, Gillard was elected unopposed as his replacement, thus becoming prime minister. The subsequent 2010 federal election saw the first hung parliament since 1940. Gillard was able to form a minority government with the support of a Green MP and three independents. On 26 June 2013, after a leadership spill, Gillard lost the leadership of the Labor Party back to Rudd. Her resignation as prime minister took effect the following day. Gillard retired from politics on 5 August 2013, before the impending federal election.