Before becoming Prime Minister, she served as Deputy Prime Minister from 2007 to 2010 in Kevin Rudd's Labor government, where she was Minister for Employment and Workplace Relations, Minister for Education, and Minister for Social Inclusion.On 26 June 2013, Gillard was defeated in a leadership ballot by Rudd, following her retirement from politics.