Kevin Rudd ousted Prime Minister Julia Gillard as head of Australia's Labor Party in a leadership ballot Wednesday, with the country's first female leader to quit politics after national elections in September.

The embattled Gillard called the vote after a day of intense party-room moves to depose her in favour of her arch-rival and predecessor, who she ruthlessly deposed in 2010.

Rudd won the vote of the Labor caucus 57 to 45, the official returning officer announced, amid mounting unease in the party over an expected rout by the Tony Abbott-led conservative opposition at national elections scheduled for September 14.

Gillard must now advise Governor-General Quentin Bryce that she is resigning as prime minister, which is expected to happen on Thursday, before Rudd can be sworn into office.

Reports said Treasurer Wayne Swan, a key Gillard supporter and her deputy, had also resigned, along with a number of other frontbenchers including Trade Minister Craig Emerson.

"The mood was quite sombre," said returning officer Chris Hayes.

It was the third time since the 2010 election that Gillard's hold on power was tested.

Rudd himself launched an unsuccessful challenge in early 2012, but was routed 71 votes to 31.

Then in March this year, Labor elder statesman Simon Crean made a failed 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.

Former prime minister Rudd won the vote of the Labor caucus 57 to 45, the official returning officer announced.

Key events in their bitter rivalry:

2010

June 23 -- Then deputy prime minister, Gillard challenges Rudd to a leadership ballot as his popularity plummets following a series of policy mis-steps including shelving an emissions trading scheme and skirmishes with the powerful mining industry over tax hikes.

June 24 -- Gillard goes on to win unopposed, with Rudd declining to contest the ballot. She quickly calls national elections.

August 21 -- The Labor party fails to win a majority, prompting Australia's first electoral deadlock in 70 years.

September 7 -- Minority lawmakers throw their support behind Gillard after lengthy negotiations, ensuring Labor's return to power with a fragile coalition. Gillard appoints Rudd as foreign minister.

2011

March 8 -- Gillard's popularity drops to a record low amid plans for a pollution levy, despite pledging there would be no such tax under her government. Furious protests break out around the country.

August 31 -- High Court strikes down Gillard's refugee swap deal with Malaysia, seen as a solution to the inflammatory issue of boatpeople, forcing Labor to scrap offshore processing and release refugees.

November 8 -- Labor passes its controversial emissions reduction scheme, but fails to make any headway in the polls. Rudd consistently places ahead of Gillard as preferred leader.

2012

February 22 -- Rudd resigns as foreign minister in Washington and says he is returning home to consider his future.

February 23 -- Gillard calls a leadership ballot and says both contenders must accept the outcome as final.

February 27 -- Gillard wins the ballot with a commanding 71 votes to 31 and vows to lead a unified front to the 2013 election. Rudd promises full support and says he holds no grudges.

2013

January 30 -- Amid renewed talk about Gillard's leadership, she announces national elections for September 14.

February 15 -- Rudd dismisses mounting speculation he will again challenge Gillard, telling everyone to take "a long, cold shower".

March 12 -- An opinion poll shows Gillard would be crushed in a national election, but Labor would easily win if Rudd was leader.

March 21 -- Senior cabinet minister Simon Crean demands Gillard call a leadership vote and urges Rudd to stand. Gillard immediately calls a ballot but Rudd declines to challenge and she retains the leadership unopposed. Rudds vows not to challenge again.

June 26 -- After weeks of rising speculation Gillard announces a party leadership ballot cutting short party-room moves to depose her. Both Rudd and the prime minister commit to quit politics if they lose.

Rudd wins the ballot by 57 votes to 45.