By Sara Powers

DETROIT (AP) — Despite a computer chip shortage that temporarily closed some of its factories, General Motors made a healthy $2.8 billion net profit in the second quarter.

The earnings came even though GM plants cranked out 200,000 fewer vehicles than they did during the same period in 2019, the last comparable quarter before the coronavirus pandemic.

READ MORE: Here Is An Update On The Chevy Bolt Recall

The Chevrolet logo is displayed on the facade of a dealership, Tuesday, Aug. 3, 2021, in Woburn, Mass. Despite a computer chip shortage that temporarily closed some of its factories, General Motors made a healthy $2.8 billion second-quarter net profit in the second quarter. (AP Photo/Charles Krupa)

The automaker told the same story as competitors Ford, Stellantis, and others, saying that high prices and strong demand for expensive pickup trucks and luxury SUVs overcame inventory shortages.

GM also boosted its net income guidance for the full year to $7.7 billion and $9.2 billion, and pretax earnings of $11.5 billion to $13.5 billion. It had been $10 billion to $11 billion.

GM executives said Wednesday that they expect tight inventory and high prices to continue through the year as the chip shortage lingers into 2022.

CEO Mary Barra cautioned that the fast-spreading coronavirus delta variant could cause supply chain problems down the road. But she said GM is managing through the shortages by allocating scarce chips to higher-demand vehicles such as pickup trucks and large SUVs.

The company also has plans to handle future shortages by collaborating with semiconductor manufacturers, she said.

“There is still more variability than I’d like to see,” Barra said Wednesday. “This is something we will work our way out of, and it won’t be an issue as we move forward over a little bit longer period of time.”

The average GM vehicle sold for nearly $44,000 from April through June, the company said, and it was up nearly $3,000 over that in July.

Chief Financial Officer Paul Jacobson said the high prices at present come from high demand for more higher-priced trucks and SUVs with a “very rich mix” of options being purchased by consumers. Barra said the prices will subside a bit as inventory grows, but she still expects them to be strong as GM adds electric vehicles to its lineup.

READ MORE: James Craig Announces Run For Governor, Begins To Campaign

Excluding one-time items, GM made $1.97 per share, beating Wall Street estimates of $1.82. Revenue was $34.2 billion, which also exceeded analysts’ estimates of $29.92 billion, according to FactSet.

The profit would have been $1.3 billion higher if not for recall costs, including $800 million to fix a battery fire problem in older Chevrolet Bolt electric vehicles, the company said.

Still, the earnings eclipsed the same quarter in 2020, when GM lost $806 million as plants closed, and sales slumped at the start of the coronavirus pandemic.

GM shares fell more than 7% after Wednesday’s opening bell, to $53.66. That’s because the company’s 10% North American profit margin missed analyst estimates, and its full-year pretax guidance was below expectations, Jefferies analyst Philippe Houchois wrote in a note to investors.

Barra said GM had a little more than 200,000 vehicles in stock or enough to supply 25 days of consumer demand. That’s far short of the normal inventory. Automakers like to have around a 60-day supply on dealer lots for customers to pick from.

On Tuesday, a task force of Detroit auto companies and the United Auto Workers announced that factory workers would be required to wear masks again due to the delta variant. Asked if GM would require employees to be vaccinated, Barra hinted that may be coming. “We are evaluating multiple choices that we can make, but our intent is always to keep our employees and our customers safe,” she said.

From April to June two years ago, GM factories produced more than 785,000 vehicles, according to the LMC Automotive consulting firm. But LMC estimated that fell 38% to 569,664 last quarter as GM ran short of semiconductors and had a herky-jerky production schedule with plants shut down on and off through the quarter.

Just Tuesday, GM announced that pickup truck plants in Flint, Michigan, Silao, Mexico, and Fort Wayne, Indiana, would be closed next week due to the chip shortage. Production is to resume on Aug. 16. But factories in Tennessee and Mexico that make cars and SUVs that were down since July 19 will come back online Monday.

MORE NEWS: Flat Rock Sewers Free Of Gasoline From Ford Gas Leak