General Motors Co. on Thursday posted a profit of $4.9 billion for 2012, down 36 percent from a year earlier, when it made $7.6 billion. Its net income fell because of European losses and a truckload of one-time accounting gains and losses in both years. Last year’s pretax profit, which excludes the one-time items, still dropped, but only by 5 percent to $7.9 billion. Revenue for the year rose 1 percent to $152.3 billion.

The company’s money machine, North America, made $6.9 billion before taxes for the year. But GM lost almost $1.8 billion in Europe, where it has too many factories and workers as sales slow in a faltering economy.

The European losses widened by more than $1 billion. They also wiped out the combined $1 billion made by GM’s auto loan and South American businesses, plus part of the $2.2 billion made by International Operations including China. GM expects the European market to weaken further this year, which could further stress its bottom line.

Just about every automaker is seeing sales fall and losses mount in Europe as the economy there continues to unravel. And GM’s use of US profits to cover the losses isn’t unique. Its chief rival, Ford Motor Co. posted a record North American pretax profit of $8.3 billion last year, but it lost $1.75 billion in Europe.

Still, GM executives are optimistic that cost cutting and 23 new vehicles by 2016 will help Europe break even before taxes by the middle of this decade. They predicted some improvement in GM’s Europe performance this year, and they said new pickup trucks, two new Cadillacs, and other new models will keep profits rolling in the United States.

‘‘The GM launching these products is undeniably a stronger company than it was even a year ago,’’ chief executive Dan Akerson said.

The optimism is showing up on GM’s income statement. In the fourth quarter, the company returned roughly $35 billion in US and Canadian tax credits to its books. Under accounting rules, GM must book the credits because it’s likely to use them to offset income taxes. The gain, though, was largely offset by removal of goodwill and the devaluation of assets in Europe because the prospects aren’t so good.

Chief financial officer Dan Ammann said restoring the tax credits is good news for GM because it’s a sign that profits will continue. GM has made $13.4 billion since the start of 2010, shortly after it left bankruptcy protection.

Akerson has said he expects GM to post a modest market share gain this year with total US sales expected to rise from 14.5 million in 2012 to more than 15 million.