Opposition leader Malcolm Turnbull late last night faced down a rebellion within his Liberals to declare victory in the bitter party room debate over Prime Minister Kevin Rudd's greenhouse emissions trading scheme.
Furious senators who were voting in a chamber division when Turnbull made the victory announcement demanded that the marathon meeting, which began yesterday morning, continue as talk hardened of a leadership challenge.
Former minister Kevin Andrews, an ETS opponent, emerged from the meeting to tell reporters Turnbull's job was on the line, and if a challenge was on, he would be a candidate.
Turnbull had also been rocked by the defection of two of his most influential backers, former emissions trading spokesman Andrew Robb and frontbencher Tony Abbott.
Turnbull appeared to be counting on the full support of his shadow cabinet - which had agreed to the major concessions proposed by Rudd - to give him the numbers to win over the majority of backbenchers who opposed the scheme.
As the meeting finally wound up, Turnbull had prevailed, although some opponents continued to claim he had not won majority support and a leadership challenge could still be on the cards.
Andrews said that 41 had opposed supporting the Government, against 34 who backed Turnbull, supporting the view that the numbers were clearly opposed to the passage of Rudd's package, which will be put to the vote in the Senate this week.
But rebel senators will join the junior Coalition partner, the Nationals, to cross the floor to vote against the ETS. The Greens and Family First senator Steven Field also want the bill delayed until after next month's climate change summit in Copenhagen.
Turnbull had earlier put his job on the line over support for the ETS, a policy of the previous conservative Government and an issue that Rudd could use for an early election in which the Opposition could face defeat and the loss of more seats in Parliament.
But with his narrow and divisive victory Turnbull will continue to face a disgruntled party scarred by the wounds of the debate, possibly providing fertile grounds for dissidents who have previously plotted against him.
The scheme has already passed the Lower House, in which the Government has a majority, but has yet to succeed in the Senate, which has already rejected it once.
Opponents do not want Australia to introduce an ETS until it knows what the rest of the world intends doing, to avoid locking the country into potentially damaging commitments. There are also a significant number of climate change sceptics who challenge the science of global warming.
Widespread acceptance that Copenhagen will almost certainly fail to produce a binding agreement has hardened opposition.
But Rudd told the BBC he believed a deal was possible next year through a two-step process, developing policy through a heads of agreement at Copenhagen and a later binding pact.
"I would expect that if we could get the heads of policy agreement in the key areas ... then in the course of 2010 I believe we can deliver a legally binding treaty document. One inevitably flows from the other."
The Greens yesterday lambasted the compromise deal accepted by the shadow cabinet, labelling Rudd "Old King Coal". They will try to delay a vote in a bid for time to persuade the Government to take a tougher stand.
Greens leader Bob Brown said the deal was "terrible for Australia and ordinary Australians, taking money from every household in the country to fund major polluters. It's polluters' pay day in Parliament House."
The compromise made significant concessions to the Opposition, meeting demands including the exclusion of agriculture and an extra A$7 billion in assistance for electricity generators, manufacturers and miners.
Targets for 2020 remain unchanged. With Turnbull's victory - and even with rebels crossing the floor and opposition from the Nationals - Rudd will have the numbers to ensure the ETS passes the Senate this week.
The PM said the Government needed to deal with political realities to get the legislation through Parliament and to provide certainties both for the Australian economy and long-term investment, and for negotiators in Copenhagen. "[A new ETS] means that as we approach Copenhagen, the world knows where Australia stands."