Just as American automakers started pulling back on EVs, the Iran war has sent gas prices skyrocketing, opening up a crucial opportunity for Chinese car companies to seize the moment.

In December, Ford took one of the biggest write-downs in history with a $19.5 billion charge on its EV business. As part of the move, the company killed its all-electric F-150 pickup truck and will retool it as an extended-range hybrid amid a broader shift away from EVs. General Motors, for its part, announced total EV-related charges of $7.6 billion, abandoning plans to build EVs at a Michigan factory that will now make gas-powered SUVs and pickups.

“We can’t allocate money for things that will not make money,” Ford CEO Jim Farley said in December when commenting on the EV pullback to Reuters. “As much as I love those products, the customers in the U.S. were not going to pay for ‌them. And that was the end of that.”

American automakers’ calculations initially seemed well-founded. EV sales collapsed by 36% year over year in the fourth quarter, just after President Donald Trump ended the EV tax credit, according to data from Cox Automotive. With inflation back on the rise and the labor market softening, U.S. consumers seemed hesitant to fork over $55,000 on average for a new EV without the tax credit.