Kevin Rudd's leadership was hanging in the balance on Wednesday night after the Australian Workers' Union withdrew its support and a group of young turk MPs threw a rocket under his prime ministership.
Mr Rudd was locked in talks with Julia Gillard and a number of senior cabinet members on Wednesday evening as support for the prime minister swung away through the night.
Treasurer Wayne Swan, Finance Minister Lindsay Tanner, Defence Minister John Faulkner and Infrastructure Minister Anthony Albanese were in with Mr Rudd and Ms Gillard through the night.
The drama is believed to have begun on Wednesday morning when NSW powerbroker Mark Arbib, Victorians Bill Shorten and Dave Feeney, and South Australian Don Farrell visited Ms Gillard to tell her they had lost confidence in the prime minister.
Late Wednesday Mr Rudd's leadership began to look untenable when senior union powerbrokers Paul Howes and Bill Ludwig threw their weight behind Ms Gillard.
Mr Howes told AAP they had looked at the Labor research in recent hours and decided a change in leadership was in the best interest of their members.
He and Mr Ludwig had decided it was in the best interest of their members to throw their weight behind Ms Gillard.
Only hours earlier Mr Rudd had denied suggestions that his chief of staff, Alister Jordan, was taking the temperature of caucus to gauge support for his leadership.
"Alister's job, since I became leader of the opposition, is to be in constant contact with members of the parliamentary party and with ministers and with cabinet ministers and parliamentary secretaries," Mr Rudd told reporters.
"I don't think anything's really changed much in the last four years.
"Those are the sorts of conversations that happen every day and have done so ever since I got this job."
Trade Minister Simon Crean, a strong ally of Ms Gillard's, came out in support of Mr Rudd.
"I do not support any leadership challenge," he told AAP through a spokesman.
"Any loose talk or idle speculation on this matter is counterproductive."I urge solidarity behind the leader. I support Kevin as the leader."