New York CNN Business  — 

Ford posted a much better first quarter than Wall Street was expecting. But it warned that the computer chip shortage that has dogged automakers will get worse before it gets better.

The chip shortage will likely reduce Ford’s 2021 production by about 1.1 million vehicles and cut its profit by about $2.5 billion, the upper end of the range it previously gave for the hit to earnings. The shortage will trim about 10% of its planned production in the current quarter, the company said in its earnings statement Wednesday.

Despite the strong results, the warnings about the difficulties ahead for the chip shortage sent shares of Ford (F) slightly lower in after-hours trading.

The good news for the automaker and its shareholders is that Ford expects the chip issue to bottom out during the second quarter.

Automakers cut back computer chip orders early last year when the pandemic caused temporary plant closures and slammed the brakes on auto sales and production. Electronics makers, who enjoyed strong sales during the pandemic, eagerly snapped up the excess supply.

But when car sales bounced back sooner than expected, the industry was left struggling to find necessary parts, causing widespread shutdowns around the globe.

Overall in the quarter Ford earned $3.6 billion in adjusted net income, roughly four times as much estimates from analysts surveyed by Refinitiv. And it was a huge turnaround from the $919 million it lost on that basis in the year-ago period.

One of the things helping Ford’s bottom line was a non-cash gain of $902 million from its investment in electric truck maker Rivian.

The company also enjoyed strong customer demand for its new products, tight vehicle inventories and favorable year-over-year cost performance. It said it was profitable in every market where it sells vehicles worldwide except for India.