General Motors delivered a positive jolt to Wall Street on Wednesday morning when it announced strong earnings for both the fourth quarter and full year, comfortably exceeding analysts’ expectations that both revenues and earnings would dip sharply.

The strong numbers, however, could further stoke criticism of Detroit’s largest automaker, coming at a time when it is laying off thousands of workers and preparing to close three assembly and two parts plants.

For the final quarter of 2018, GM delivered earnings of $1.43 a share — $1.40 after excluding special items. The consensus, according to Zacks Investment Research, was $1.24. For the full year, earnings came to $6.54 a share, well ahead of the consensus forecast of $6.29. After special charges, the figure dropped to $5.58 per share.

GM’s overall $8.1 billion profit for all of 2018 was more than double the $3.9 billion number from the year before, but the 2017 figure reflected a significant hit from the sell-off of the company’s long-troubled European Opel-Vauxhall subsidiary. It was acquired by PSA Group, parent of the Peugeot and Citroen brands.

"What’s apparent is that GM has cleaned up its balance sheet,” Michelle Krebs, a senior analyst with AutoTrader, said. “Getting out of Europe has proven to be a smart move."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

GM surprised on a number of levels. Fourth-quarter revenues rose 1.8 percent to $38.4 billion, confounding analysts who had forecast a 3 percent dip.

How investors will view the company moving forward is uncertain but GM’s outlook is clearly bullish. Last month, it upped its own forecast for 2019 to between $6.50 and $7.00 a share, well ahead of what analysts had been predicting.

Mark Reuss, the company’s new president, said Tuesday its improved outlook reflects some of the “tough decisions” it has been making. In November, it outlined a broad restructuring plan expected to save $3 billion this year and another $3 billion in 2019. The strategy shifts focus away from passenger cars — with six sedans set to vanish this year. But that will result in the closure of three U.S. and Canadian assembly plants and two parts factories.

All told, the GM North American workforce is expected to decline by more than 14,000 by the end of 2019. Thousands of salaried and contract workers have already been terminated, and GM this week began handing out pink slips to about 4,000 more.

Several thousand hourly employees are also at risk as those plants begin to close this year, though Reuss said Tuesday the automaker thinks it can transfer all but about 100 of them to other plants producing light truck models. That includes an assembly line in Flint that this week debuted the new Chevrolet Silverado HD. With demand for pickup and utility vehicles booming, GM hopes to boost capacity.

Even so, the automaker is taking intense heat for its cutbacks, much of it focused around the new Chevrolet Blazer SUV that is being built in Mexico, rather than one of the plants being closed.

"Now it is incumbent on General Motors to have the back of American workers and invest in American manufacturing,” U.S. Rep. Dan Kildee, a Flint, Michigan Democrat said in a statement this week. “We didn’t rescue the American auto industry to save jobs in Mexico. The American taxpayer rescued General Motors to support American workers.”

For his part, Reuss said the cuts were “tough,” but necessary. The best time to make cuts is not when you’re already in a downturn, he said. “The time to do it is when you’re healthy.”

Both GM’s Canadian and U.S. unions have called for boycotts of the new Blazer. But workers could feel a little better when profit-sharing checks begin to go out shortly.

The 46,500 members of the United Auto Workers Union who qualify for the bonuses will receive an average $10,750 apiece based on the $10.8 billion in pretax profits GM racked up in North America this year. That will be down from last year’s average $11,500 checks reflecting a 9 percent decline in the home region’s profits compared to 2017.