Australian PM to leave office after losing party leadership challenge Australian Prime Minister Julia Gillard will call for a vote to challenge her own leadership of the Labor Party on Wednesday NEW: Rival Kevin Rudd replaces Gillard as party leader and becomes de facto prime minister Gillard called for a vote to challenge her own leadership due to friction in her party She calls for the loser of the inner-party vote to quit politics She says that call applies to her as well (CNN) -- Australian Prime Minister Julia Gillard is to leave office, after the Australian Labor Party voted her out of its leadership Wednesday. She had called for the vote herself after months of friction within the Australian Labor Party. Her rival, former Prime Minister Kevin Rudd, will take her place as party leader, after winning the internal ballot by a margin of 57 to 45 votes. He becomes Australia's de facto prime minister and could be sworn in within hours, if the Australia's acting head of state, the Governor-General approves him for the office. Queen Elizabeth is Australia's official head of state. Rudd is widely popular with Australian voters, who go to the polls in September to pick a new parliament and government. The ALP has not felt confident it could take an election victory with Gillard at its helm. Supporters within the ALP circulated a petition calling for Rudd to challenger Gillard's leadership, but he initially refrained. In the meantime, at least eight of the ministers in Gillard's cabinet have resigned, purging decades of experience from her government. This week the prime minister had enough. In spite of no official challenge from any rival, she put her power on the chopping block and handed her party the ax. "I do think it's in the best interests of the nation -- and in the best interests of the Labor Party -- for this matter to be resolved," she said. Reluctant Rudd In a jab at her potential challenger, Gillard complained in an interview with CNN affiliate Sky News Australia this week that no one had approached her to mount a leadership ballot in a traditional manner. "Call me old fashioned, but the way in which these things are normally done is a challenger approaches the leader of the Labor Party and asks them to call a ballot for the leadership, you shake hands and then a ballot is held," she said. Gillard called for any challengers to put their names on the ballot, which would be the last one she will call to challenge her position. Three hours before the vote, Rudd picked up the gauntlet. Various ministers have been free and frank in their public advice to me as to the desirability to contest the leadership in recent days. For the nation's sake, I believe it's time for this matter to be resolved," he said in a statement sent to journalists. The showdown was set in stone. Rudd has said that he will not use his win against party rivals. Every effort I have in my being will be dedicated to uniting the Australian Labor Party. No retributions, no pay backs, none of that stuff. It's pointless, it's old politics," he said. Loser leaves In the March, Gillard threw down a similar challenge to her own power as the rivalry sapped strength from her government. Rudd refused back then to challenge her, and she won the vote of confidence from her party and kept her job. But she continued to lose support within her party. In her interview with Sky News, Gillard demanded that the loser of Wednesday's vote get out of the way for the sake of a functioning government. "If you win, you're Labor leader," she said. If you lose, you retire from politics. Gillard affirmed that that goes for her, too. CNN's Brian Walker and Elizabeth Joseph contributed to this report