Australian Prime Minister Julia Gillard and the man she ousted, Kevin Rudd, are to contest a party leadership vote.
Ms Gillard called the vote after Mr Rudd’s supporters sought to force a party meeting to hold a ballot.
The vote will take place at 19:00 local time (09:00 GMT) on Wednesday. Both contenders have committed to stepping down from politics if they lose.
The move comes ahead of a 14 September election, which polls suggest Labor is set to lose.
Ms Gillard toppled Mr Rudd in a leadership challenge in 2010, but he remains more popular with voters.
The Labor party has been divided by bitter in-fighting between supporters of Ms Gillard and Mr Rudd, and there has been sustained speculation over the leadership in recent weeks.
‘This is it’
Julia Gillard’s call came hours after news surfaced that Kevin Rudd’s supporters were circulating a petition calling for a caucus meeting to vote on the party leadership.
Ms Gillard said that this was the final opportunity for the issue to be resolved.
“I have been in a contest with the leader of the opposition, but I’ve also been in a political contest with people from my own political party,” she said.
“We cannot have the government or the Labor Party go to the next election with a person leading the Labor Party and a person floating around as the potential alternate leader.”
“Anybody who enters the ballot tonight should do it on the following conditions: that if you win you’re Labor leader, that if you lose you retire from politics.”
“This is it, tonight is the night,” she said. “I wouldn’t be putting myself forward unless I had a degree of confidence.”
Shortly afterwards, Mr Rudd told reporters that he intended to run. “For the nation’s sake I believe it’s time for this matter to be resolved,” he said.
“I believe with all my heart that I owe it to the Australian people to offer them a viable alternative.”
He added that he believed the Labor party was “on course for a catastrophic defeat unless there is change”.
“If I lose, of course I would announce that I would not contest the next election and I thank Julia for making the same commitment.”
Mr Rudd would need the support of at least 52 of Labor’s 102 MPs in order to oust Ms Gillard.
In March Mr Rudd declined to contest a leadership vote and said afterwards that there were “no circumstances” under which he would seek the top job.
Nonetheless speculation that he could return had persisted amid polling showing he could deliver a better outcome for Labor in the election.
A poll published earlier this month suggested that three cabinet ministers would lose their seats under Ms Gillard, but would retain their seats if Mr Rudd was leading the party.
Tony Abbott leads the opposition coalition, which polls suggest is currently on course for a convincing win.
Earlier on Wednesday, Tony Abbott challenged Ms Gillard to bring forward the election date to 3 August, and said that “paralysis” was gripping the government.
BBC