She has led a tenuous minority government since her parliamentary majority was diminished in a disappointing 2010 election. Although she beat back a leadership challenge from Mr. Rudd early in 2012, she has since slid in the polls against Tony Abbott, the leader of the opposition Liberal-National coalition. Despite Mr. Rudd’s insistence that he would not challenge Ms. Gillard again for the leadership, his supporters had been actively canvassing the party for votes should his name be put forward during a vote like the one held Thursday.

Ms. Gillard is seen by many within the party as an ineffective campaigner who is unlikely to deliver a victory in the Sept. 14 elections. Supporters of Mr. Rudd, including Mr. Crean, had seemed confident earlier in the day. “Something needs to be done to break this deadlock,” Mr. Crean said at a hastily assembled news conference in the capital, Canberra. He said he had personally asked Ms. Gillard to hold the leadership vote — known in Australia as a “spill” — because the party had lost its way and its confidence in her leadership.

But it was Ms. Gillard and her supporters who ended the day on a confident note, declaring the question of the party’s leadership settled once and for all.

“Today the leadership of our political party — the Labor Party — has been settled and settled in the most conclusive fashion possible,” Ms. Gillard told reporters. “The whole business is completely at an end. The government has a plan for the nation’s future. We have plenty of work to be getting on with, and we will be getting on with it in a few minutes’ time.”

Mr. Abbott, the opposition leader, appeared unconvinced that Labor’s infighting was over. He called on Ms. Gillard to end the cycle of instability within her party by calling an early election and letting the voters decide who should lead.

“This has been a remarkable and bizarre day in the history of this Parliament,” he said at a news conference. “The civil war goes on. The civil war will continue as long as Kevin Rudd and Julia Gillard are in Parliament. The only way to give our country the good government that we so badly need right now is to have an election.