On 23 June 2010, Deputy Prime Minister Julia Gillard challenged Kevin Rudd for the leadership of the Labor Party. Realising that he no longer had enough support to retain his position, Rudd resigned the following day, allowing Gillard to be elected unopposed. Swan stood to fill the vacant position of Deputy Leader, and was also elected unopposed. He was sworn in as Deputy Prime Minister of Australia later that day. Days later, Swan attended the G20 Toronto Summit in Gillard's place. He would regularly stand in for Gillard as Acting Prime Minister for the next three years.