DETROIT (AP) — Despite a 40-day strike by factory workers and slumping sales in the U.S. and China, General Motors still made money last year.

The company posted a $6.58 billion profit for the year, but that was down almost 17% from 2018.

GM couldn’t avoid red ink the fourth quarter, though. The automaker lost $232 million, or 16 cents per share, largely because most of the strike by the United Auto Workers union happened during the quarter.

Excluding one-time items for employee separations and the sale of a Chinese joint venture, GM made 5 cents per share, soundly beating Wall Street estimates. Analysts polled by FactSet expected a profit of 1 cent per share.

Revenue for the quarter was $30.8 billion, down almost 20% from a year ago. That fell short of Wall Street estimates of $31.2 billion.

The company still made $8.2 billion in North America for the full year, so about 47,000 U.S. factory workers will get $8,000 profit-sharing checks this month. That’s down from $10,750 in 2018.

GM said the strike, which ran from Sept. 16 through Oct. 25, cost the company sales of 191,000 vehicles and cut quarterly pretax earnings by $1.39 per share. For the full year, the strike cost GM $1.89 per share, the company said.

The bitter strike paralyzed GM’s U.S. factories and cut production in the U.S. and Canada before it was settled.

The company expects pretax earnings of $5.75 to $6.25 per share this year, about flat with 2019 when strike costs and profits from its investment in the Lyft ride-hailing company and stock warrants in France’s PSA Peugeot are backed out.

More about: