DETROIT — In a remarkable financial U-turn, once-bankrupt General Motors recorded its first profitable year since 2004 and is tantalizingly close to reclaiming its title as the world's No. 1 automaker.

DETROIT — In a remarkable financial U-turn, once-bankrupt General Motors recorded its first profitable year since 2004 and is tantalizingly close to reclaiming its title as the world's No. 1 automaker.

The company faces a bumpy road ahead: Gas prices are rising, GM has only a few new models, and its European operations are still losing money.

Still, the automaker's $4.7 billion profit for 2010 was impressive, especially considering where it has been. The company lost more than $80 billion in the five years before its bankruptcy and needed a government bailout to survive. It emerged in the summer of 2009 cleansed of huge debt and costly labor contracts, returned to the stock market in November, and managed to make money even with auto sales near historic lows.

"I'm not sure anyone would have predicted a year ago that GM will deliver net income of $4.7 billion," Chairman and CEO Dan Akerson said Thursday.

The annual profit, fueled by strong sales in China and the U.S. as the global auto market began to recover, gave GM its best year since 1999, when it made $6 billion during the pickup and SUV boom.

GM executives predicted the automaker would build on last year's earnings as sales continue to rise, especially in North America. With a good performance by GM this year, the U.S. government could recover more of its $49.5 billion bailout, nearly half of which has been repaid.