New York CNN Business  — 

Ford reported surprisingly good financial results at the end of a tough year, and said it was increasing its commitment to vehicles of the future with a big bet on electric and autonomous driving vehicles.

The company said it will invest $29 billion in EVs and AVs. It will require a bit of a catch-up by Ford, which just came out with its first EV in years, the Mustang Mach E.

While Ford’s statement spoke about taking a leadership position in EVs and AVs, some of its larger rivals are much further along in shifting to electric vehicles.

EVs already make up nearly 3% of Volkswagen’s global sales. And General Motors, which had the best selling EV in China in the fourth quarter, announced last week that it hopes to sell nothing but emissions-free vehicles by 2035.

“We watched one out of 10 vehicles sold in Europe in December be pure electric. EV sales in China continue to grow, and the reality is that customers, including in the US, are increasingly giving e-mobility greater consideration,” said Ford CEO Jim Farley. “We have no intention to cede ground to others.”

Ford hyped the debut of the Mach-E in its announcement Thursday, but it also spoke about the importance of two gasoline-powered vehicles that will be key to 2021 profits — the return of the Bronco SUV and the newest version of the F-150 pickup, the nation’s best selling vehicle.

The good news for Ford is that it reported it made $1.3 billion in the quarter, excluding special items. It was a strong end to a dismal year that had included losses over the first half.

The results were more than double the $499 million it on that basis made the last quarter of 2019, before the pandemic hit its operations and sales, when Ford was benefiting from a long strike at rival GM. Wall Street analysts had forecast a loss of $347 million in the most recent quarter.

But with special items — which included a charge for permanently shutting manufacturing operations in Brazil, a charge to recall 3 million airbags made by bankrupt airbag manufacturer Takata, and some pension accounting — the company posted a net loss of $2.8 billion in the quarter, compared to a net loss of $1.7 billion a year earlier. That resulted in a full-year net loss of $1.3 billion, after a narrow $47 million profit in 2019.

For the full year, income excluding items was $1.6 billion, down two-thirds from what it reported on that basis in 2019. Revenue for the year fell 18% to $127 billion, as the number of vehicles it sold dropped 22%.

The company said its 2021 earnings should be better than current forecasts, helped by a $900 million gain it expects to post on its investment in electric truck maker Rivian. But the company is facing some headwinds from a shortage of computer chips, which has caused some temporary shutdowns in its factories. Other automakers are also dealing with that problem.

“Our current estimates from suppliers…[is that] we could lose 10% to 20% of our planned first quarter production,” said CFO John Lawler. “If that scenario is extended through the first half, this could adversely impact our full year adjusted [earnings] by between $1 billion and $2.5 billion.”

Most of that sales decline came in the first half of 2020, when its factories were shut down for the pandemic and job losses and layoffs crushed demand for new vehicles. Ford vehicle sales fell 9% in the fourth quarter.

Shares of Ford (F) were narrowly higher in after-hours trading on the report.