The only viable option to save General Motors Corp is a sale of its main assets to a New GM, a U.S. Treasury official told a bankruptcy court on Wednesday as the automaker sought approval for the deal.

GM was in the second day of a bankruptcy court hearing in Manhattan in which the automaker is asking Judge Robert Gerber to approve its asset sales, just one month after filing for Chapter 11 bankruptcy.

At the beginning of the hearing, lawyers for a group of dissenting bondholders asked GM restructuring adviser Bill Repko, of the investment bank Evercore, and Harry Wilson, a senior member of the Obama administration's autos task force, whether GM could have pursued a traditional reorganization rather than a speedy sale of its assets to the New GM.

There was a constant dialogue in thinking through our options, Wilson said, describing how the government had concluded that a sale was the only viable path forward for the company.

We could not find any reasonable measure of opinion from anyone ... who felt that General Motors could survive a traditional Chapter 11, Wilson told the court.

He testified that last December the government was effectively the lender of last resort for GM, which gave it significant leverage over the automaker's restructuring. He said the government wanted GM to stay in bankruptcy for only 30 to 40 days. The government has set a July 10 deadline for closing the sale of the company's main assets.

A successful sale would mark the second big victory for the Obama administration's autos task force, which earlier this month helped broker the sale of Chrysler LLC to a group led by Italy's Fiat SpA . The U.S. Supreme Court cleared the way for that deal to go through on June 9.

If the GM deal is approved, the company will be able to sell its best assets, including Chevrolet and Cadillac, under Section 363 of the bankruptcy code to a New GM, while the U.S. Treasury would provide $60 billion in financing to GM, including a proposed $50 billion that would give the U.S. Treasury a 60 percent ownership stake in the company.

Under the government-backed plan, the United Auto Workers union would gain a 17.5 percent stake in New GM, the Canadian government would own about 12 percent, and GM bondholders are expected to get about 10 percent.

GM's old assets would remain behind in bankruptcy court to be liquidated.

No competing bidders have emerged as an alternative to the U.S. government's plan for the automaker.

The case is In re: General Motors Corp, U.S. Bankruptcy Court, Southern District of New York, No. 09-50026.

(Reporting by Emily Chasan and Phil Wahba; editing by John Wallace)