gmA U.S. federal judge has authrorized the sale of General Motors’ most profitable assets to a “new GM,” backed by the government, in a move seen as crucial for the automaker to exit bankruptcy protection.

The decision by Judge Robert Gerber of the U.S. bankruptcy court in Manhattan came after three days of hearings to address the 850 objections to the restructuring plan. In his 95-page opinion, Judge Gerber wrote that the sale would “prevent the death of the patient on the operating table.”

Under the terms of the revised deal, G.M. would sell its best assets, including the Chevrolet, Cadillac, Buick and GMC brands, to a new company owned largely by the American and Canadian governments and a health care trust for the United Automobile Workers union.

That still leaves the question of the “old GM,” which includes Opel, Vauxhall and Hummer. Just as people thought that GM’s plan to sell Opel and Vauxhall to Canadian auto supplier Magna International was a done deal, China’s Beijing Automotive Industry Holding made a concrete offer to buy both brands for $924 million. That leaves the future of Opel uncertain for now.

Also not a done deal: GM’s plan to sell Hummer to China’s Sichuan Tengzhong. The potential buyer is in talks with Chinese regulators to win approval for its acqusition, but there are no guarantees it will get the green light.