DETROIT - General Motors Corp.'s bankruptcy filing yesterday will do what its past chief executive officers could not - cleanse the century-old company of burdensome labor costs, unprofitable old factories, and a boatload of debt.

The price was one no GM chief was willing to pay until now. The slimmed-down company will be a ward of the U.S. government, 60 percent owned by taxpayers, with half of its eight main brands gone.

Industry analysts, GM executives, and even President Obama say GM will now have the cost structure to compete in the global market and one day return to profits.

First, GM needs people to start buying cars and trucks again. Worldwide sales are at historical lows. And GM has to convince buyers in its home market that its cars are as good as those made by the Japanese.

GM reached a pact with the United Auto Workers that it says brings costs more in line with Japanese automakers that have U.S. plants. Also, monthly debt payments will drop dramatically because GM will owe only $17 billion rather than the $54.4 billion it owed as of the end of March.

GM says that will help it break even when the U.S. market is a paltry 10 million vehicles annually compared with the industry peak of 17 million earlier this decade. That almost guarantees a profit, said Tom Libby, an independent Detroit-area auto analyst.

Most economists expect sales to begin recovering toward the end of this year, rising to 12 million or 13 million in 2010 or 2011.

Any recovery for GM is predicated on selling cars that people want to buy.

Bob Lutz, a GM vice chairman who is retiring at the end of the year after more than four decades in the auto business, maintains that the automaker sold hundreds of thousands of pickup trucks and SUVs because that was what Americans wanted when gasoline was cheap.

Now, the Obama administration wants a smaller, more efficient fleet to help end the country's reliance on foreign oil and cut greenhouse-gas emissions.

Another issue could be control of GM, which some analysts warn may not be clear-cut. Michael Robinet, vice president of CSM Worldwide Inc., a Detroit-area auto-industry consulting firm, is concerned that the government and the UAW, which will hold a 17.5 percent stake, could become too involved in GM's daily affairs.

"The decision-making matrix is very muddy," he said. "Will the union and/or the government step aside and let the decisions be made? That remains to be seen."

GM also needs a speedy trip through Bankruptcy Court to get past bad publicity.

Then once it is out of Bankruptcy Court, GM has to address the issue of quality. Even its biggest boosters concede Detroit made poor-quality cars in the 1980s and '90s, sending many loyal customers to Honda Motor Co. Ltd. and Toyota Motor Corp.

"Because of poor quality in the past, everybody out there thinks we're still producing junk," said Jim Harbour, author of a book on auto manufacturing.

Lutz and Robinet say GM is making better cars now, pointing to the Chevrolet Malibu sedan.