Australia's former leader Kevin Rudd ousted Prime Minister Julia Gillard as Labor chief in a dramatic ballot Wednesday, deposing the country's first female premier as the party fights for electoral survival.
The embattled Gillard -- who will quit politics in September -- called the vote after a day of internal party manoeuvring in favour of her arch-rival and predecessor, whom she had ruthlessly deposed in 2010.
Rudd won the vote of Labor lawmakers 57 to 45 amid mounting unease in the party over an expected rout by Tony Abbott's conservative opposition at the national polls scheduled for September 14.
Gillard made a late-night visit to Governor General Quentin Bryce to offer her resignation and recommend Rudd be reinstated as prime minister, three years and two days after he was dumped by the party.
Analysts said Rudd may move the election date forward to August, hoping to capitalise on a bounce in the polls and build on his previous vows to reorient Australia's resources-fuelled economy towards the Asia-Pacific region.
"In 2007 the Australian people elected me to be their prime minister. That is a task that I resume today with humility, with honour and with an important sense of energy and purpose," said Rudd after his victory.
"In recent years politics has failed the Australian people, there's just been too much negativity all round. There's been an erosion of trust; negative, destructive personal politics has done much to bring dishonour to our parliament.
"All this must stop."
At a pre-ballot news conference, Rudd said he had been persuaded by MPs and "thousands" of ordinary Australians demanding he challenge Gillard "because of the parlous circumstances we now face".
Gillard dispatched her rival in a 2010 party room coup but he remains popular with the public and is seen by many as Labor's best hope of salvaging the elections, despite a series of policy missteps leading to his ousting three years ago.
Making his pitch ahead of the caucus vote, Mandarin-speaking Rudd, 55, said Labor was "on course for a catastrophic defeat unless there is change" and the people of Australia had made their feelings known.
It was a night of heavy casualties for the party, with several top Gillard appointees refusing to serve under Rudd including Deputy Prime Minister and Treasurer Wayne Swan, who was replaced by transport minister Anthony Albanese.
Trade Minister Craig Emerson, Agriculture Minister Joe Ludwig and Climate Change minister Greg Combet also stood aside.
It was the third time since the 2010 election that Gillard's hold on power was tested.
The charismatic Rudd himself launched an unsuccessful challenge in early 2012 while foreign minister, but was routed 71 votes to 31 and was forced onto the backbenches.
Then in March this year, Labor elder statesman Simon Crean made an abortive attempt to reinstall Rudd, who refused to stand and said at the time he would not challenge Gillard "under any circumstances".
In the aftermath, several ministers who backed Rudd resigned while Crean was sacked.
In confirming he would challenge this time, Rudd vowed to rebuild the faction-riven Labor Party.
"Every effort I have in my being will be dedicated to uniting the Australian Labor Party," he said. "No retributions, no paybacks, none of that stuff. It's pointless, it's old politics."
Gillard will not be around to hinder him, announcing before the vote that she would retire at the elections if she lost.
Since assuming power, Australia's first female prime minister endured near-constant speculation about her leadership.
She won only the narrowest of victories in the 2010 election, resulting in a hung parliament which forced her to cobble together a minority government with the support of independents.
In announcing her retirement, Gillard said Labour could still win the election by "putting the divisions of the past behind us and uniting as a political party", adding that it had been "truly humbling" to serve as leader.
"I thank the Labor Party for that privilege and I thank the Australian people for their support."
Parliament was due to adjourn on Thursday night for the last time before the national polls, so any ballot had to be held before the legislative body disbanded.