Updated

Australia Prime Minister Julia Gillard says she will step down from her position after being unseated as Labor Party leader by her predecessor Kevin Rudd following a 57-45 vote by party lawmakers Wednesday.

Gillard had said whoever loses the vote should quit Parliament at upcoming elections, and Rudd agreed. She called for the party vote in response to reports that Rudd's supporters were pushing for a challenge, in hopes of avoiding what opinion polls suggest will be a massive defeat for the ruling Labor Party in the elections.

"In accordance with the pledge I gave earlier today I announce that I will not recontest the federal electorate of Lalor at the forthcoming election," Gillard said at a news conference. "I will have time in the coming weeks to be back home in my electorate to say hello and goodbye to the community that I've had the absolute privilege of representing in this Parliament since 1998."

Gillard has said she has written to Australia's Governor-General, Quentin Bryce, to commission Rudd as the next prime minister.

She said we was "proud" to serve as Australia's first female prime minister, according to News.com.au.

"It will be easier for the next woman, and the woman after that and the woman after that. And I am proud of that,"  Gillard said.

Bryce is seeking high-level advice from the Acting Solicitor-General, Justin Gleeson, to discuss the constitutional impact of the leadership change before confirming Rudd as the next prime minister, News.com.au reports. Rudd previously held the post from 2007 to 2010 before losing to Gillard.

Rudd likely will have to demonstrate that he can command a majority of lawmakers in the House of Representatives.

If Rudd is not approved, opposition leader Tony Abbott could be asked to form a government or elections could be moved up from September to August.

Deputy Prime Minister and Treasurer Wayne Swan quit after Rudd's victory and was replaced by Rudd ally and Transport Minister Anthony Albanese in a second ballot.

The ballots ended a bitter rivalry between Gillard and Rudd that helped create an atmosphere of chaos and disunity. Rudd previously had ruled out such a challenge unless he was assured of the overwhelming support of his colleagues. Gillard had survived two previous attempts by Rudd to take over.

"In recent years politics has failed the Australian people. There's just been too much negativity all around," Rudd said Wednesday after the vote, according to News.com.au. "I intend to lead a government that brings people together and gets the best out of them."

Opinion polls suggest the Labor party could lose around half of its 71 seats in the 150-seat House of Representatives, where parties form the government, but they also show that Rudd would be a more popular leader than Gillard.

A party powerbroker and influential Gillard ally, Bill Shorten, announced shortly before the ballot that he would back Rudd.

"I have now come to the view that Labor stands the best chance to defend the legacies of this term of government and to continue improving the lives of millions of Australians if Kevin Rudd is our leader," Shorten said.

Gillard said earlier she believed she would survive the vote: "I wouldn't be putting myself forward unless I had a degree of confidence about the support of my parliamentary colleagues."

Gillard's announcement followed media reports that a petition was circulating among the 102 Labor Party lawmakers. A special party meeting to discuss a leadership ballot would have been called if at least 34 lawmakers — 30 percent — signed that petition, but her announcement eliminated that step.

Rudd's victory could trigger an earlier election if he cannot attract the level of support from independent lawmakers and from the minor Greens party that Gillard managed.

An independent lawmaker who supported Gillard's minority government, Tony Windsor, said he would not support a government led by Rudd. But another independent who rejected Gillard, Bob Katter, said he would support Rudd.

Rudd had been a popular prime minister who started sliding in the polls when Gillard, his then deputy, challenged him to a leadership ballot three years ago. He did not contest the ballot when he became aware of the level of Gillard's support, so she was unopposed when she became the first female prime minister in Australia's history.

Weeks later, Gillard led Labor to a narrow election victory and formed an unpopular minority government with the support of independent lawmakers and a legislator from the minor Greens party.

In a 2012 ballot, Gillard easily defeated Rudd 71 votes to 31. In February, she threw open her job to a leadership ballot to end leadership speculation, but Rudd refused to challenge and she remained prime minister.

Abbott had challenged Gillard on Wednesday to bring forward the election to Aug. 3 because of the new wrangling over leadership.

"Given the paralysis now griping her government and irreconcilable differences in her party over its leadership, will she bring forward the election date to Aug. 3 and let the people decide who should run our country?" Abbott asked in Parliament.

Before announcing the leadership ballot, Gillard replied that she continued to govern effectively.

"I can assure him (Abbott) and I can assure the Australian people that as prime minister I am getting on with the job," she said.

Click for more from News.com.au.

The Associated Press contributed to this report.