BRISBANE, Australia — Australia's ruling Labor Party ousted Julia Gillard in favor of her predecessor, the more electorally popular Kevin Rudd, ahead of a national election.
He has now been officially sworn in as prime minister.
Gillard, who ousted Rudd in 2010, will now leave politics — a vow she made when calling the leadership ballot Wednesday after months of destabilizing debate over her tenure.
Gillard, who won a previous leadership challenge against the more popular Rudd to become Australia's first female prime minister, has lagged in opinion polls ahead of Australia's general elections September 14.
Her government has a reputation for infighting, which has further damaged its already dim reelection prospects.
A conservative coalition led by former trainee priest Tony Abbott is favored to win.
Rudd won Wednesday night's leadership ballot by 57 votes to 45.
His election to the party leadership does not automatically make him prime minister, however. Technically, Australia's head of state is the Governor-General, a representative of the Queen, and her permission must be sought to fill the office of Prime Minister.
Gillard resigned late Wednesday night, during a visit to the residence of the Governor-General, making Rudd Australia's de facto prime minister.
For weeks, there had been speculation about a new challenge by Rudd — who won a landslide victory for Labor in 2007 and who many in the party consider Labor's only hope of reelection.
While Rudd called the last challenge for the leadership, this time it was Gillard who threw down the gauntlet, according to the Fairfax media.
It was seen as a response to reports circulating Wednesday that a petition was being passed among Labor lawmakers calling for a vote to end the destabilizing speculation over Gillard's leadership.
She also challenged Rudd to agree that whoever loses should quit politics, which he accepted at a press conference aired on national TV Wednesday evening.
An Australian job recruiting website, Seek.com.au, was quick to spot an opportunity amid the turmoil, tweeting: "Hey @JuliaGillard, we can help you out! ;) #spill #auspol — SEEK (@seekjobs) June 26, 2013"