Rudd had already joined the Labor party before he attended the Australian National University, where he graduated in Asian studies. He worked as a diplomat (1981–88) before becoming chief of staff to the Queensland Labor Party leader (1988–92) and then Director General of the Queensland Office of Cabinet (1992–96). When Labor lost power in Queensland he worked for the accountants KPMG before securing election to the federal parliament. A shadow minister from 2001, he was elected party leader in 2006 and became Prime Minister following Labor’s victory in the 2007 election; however, by 2010 his popularity had declined and he was ousted by Julia Gillard. He served as Foreign Minister (2010–12) under Gillard but resigned as party infighting continued. He eventually ousted Gillard in June 2013 to become Prime Minister for the second time, but was defeated in a general election ten weeks later. He retired from politics later that year.