Kevin Rudd has officially returned to Australia's top job, three years after being dumped as prime minister. He was sworn-in on Thursday.
The Australian Labor Party Caucus has abandoned Julia Gillard in favour of Mr Rudd, believing he has a better chance of resurrecting the party's fortunes at the election later this year.
At Government House in Canberra on Thursday morning, Governor-General Quentin Bryce wished him well in serving the people of Australia, and Mr Rudd replied that he would do his absolute best.
As Mr Rudd signed the document sealing his prime ministership, he told Mrs Bryce he did it wrong before. "Really," Mrs Bryce exclaimed.
Also sworn in on Thursday were Anthony Albanese as deputy leader and Chris Bowen as Treasurer. Mr Rudd, Mr Albanese and Mr Bowen then walked to the front of Government House for an official photograph with the Governor-General. Asked how he was feeling, Mr Rudd said: "It's a sunny day in Australia."
Mr Rudd defeated Ms Gillard by 57 to 45 votes in a Labor caucus ballot in Canberra on Wednesday night. Two previous attempts at a comeback failed.
Mr Rudd was prime minister from the general election in 2007 until 2010, when Ms Gillard deposed him.
Ms Gillard, who vowed to quit politics if she lost, will leave Parliament at the general election. Her leadership had come under sustained and intense pressure in recent days as entrenched poor polling pointed to an historic loss for the ALP at the September 14 election. She has held the Victorian seat of Lalor since 1998 and was Australia's first woman prime minister.
Mr Rudd has promised to unite the Labor Party and take the fight to Opposition Leader Tony Abbott in the 14 September election.
Foreign Minister Bob Carr says he and his colleagues acted in the best interests of the country in the caucus vote. However, Mr Rudd's return triggered an avalanche of departures from not only the ALP frontbench but from their side of the Parliament.
Ms Gillard's most loyal supporter, Trade Minister Craig Emerson, and School Education Minister Peter Garrett will also leave parliament.
Treasurer Wayne Swan, Communications Minister Stephen Conroy, Agriculture Minister Joe Ludwig and Climate Change Minister Greg Combet all announced they will move to the backbench, and the ABC reports more ministers are expected to step down.
Kevin Rudd thanked Ms Gillard for her work as prime minister, praising her as a "woman of extraordinary intelligence, great strength, and great energy". "She has been a remarkable reformer," he said.
Ms Gillard earlier called on the party to "put its divisions behind us". "I understand that at the caucus meeting today, the pressure finally got too great for many of my colleagues," she said.
"I respect that. And I respect the decision that they have made. "But I do say to my caucus colleagues: don't lack the guts, don't lack the fortitude, don't lack the resilience to go out there with our Labor agenda and to win this election. I know that it can be done.''
Mr Swan said it had been a privilege to serve with Ms Gillard. "She is one of the toughest warriors that have ever led the Australian Labor Party," he said.
"I think she's done more as a politician for our country in three years than many other politicians could ever hope to achieve."
Mr Abbott said once again the "powerbrokers of the Labor Party" had decided who would be the nation's prime minister. He said he wants the federal election held "as soon as possible".
After the leadership ballot, the ALP caucus elected Anthony Albanese as the new deputy prime minister over party elder Simon Crean, 61 votes to 38, with three informal ballots.
Mr Albanese said the new team would do "great things for the nation". "And I believe we have this evening maximised our chances of going into a third term and beyond of a Labor government," he said.
Penny Wong was voted in unanimously to replace Mr Conroy as the party's Senate leader, with Jacinta Collins elected deputy Senate leader.
AAP reports the new Treasurer, Chris Bowen, resigned from the Gillard cabinet following an abortive leadership challenge in March. Before that he was Immigration Minister and previously had been assistant treasurer to Mr Swan.
Switch by Gillard backer
Mr Rudd's victory was virtually secured when right faction powerbroker Bill Shorten announced half an hour before the meeting that he had defected to the Rudd camp.
The ABC reports Mr Shorten played a pivotal role in the ousting of Mr Rudd and the rise of Ms Gillard three years ago, almost to the day.
Last week he said he would continue to support Ms Gillard and did not believe there would be a change of leaders.
"It is my personal conviction that the best interests of the Australian nation and the Labor party must come first, not debates about factions and personalities," Mr Shorten said after Wednesday's vote.
"I believe that Kevin Rudd being elected tonight provides the best platform for Labor to be competitive at the next election."
A Radio New Zealand correspondent says Mr Rudd never gave up on reclaiming his job. Two previous attempts at a comeback failed.