The internal leadership vote followed months of rivalry and division within the ALP.
Rudd's supporters within the ALP circulated a petition calling for him to challenger Gillard's leadership, but he initially refrained. In the meantime, at least eight of the ministers in Gillard's Cabinet resigned, purging decades of experience from her government.
This week, the prime minister had had enough. Despite 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 as she called the vote.
In a jab at her rival, 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 would 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.
Rudd said he would not use his win against party rivals but would focus on uniting the party.
In March, Gillard threw down a similar challenge to her 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 said the loser of Wednesday's vote should 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."
In her post-vote news conference, Gillard confirmed she will not seek to retain her constituency seat in the general election.