Nikola, which aims to replace diesel-fueled semis with trucks powered by batteries and hydrogen, was one of the biggest stock market gainers Tuesday among electric vehicle makers after President Joe Biden said the U.S. was cutting off imports of Russian oil because of its invasion of Ukraine.

Shares of Phoenix-based Nikola rose about 14% to closed at $7.55 in Nasdaq trading, as did Ballard Power, a maker of fuel cells that convert hydrogen into electricity. Norway’s Nel, which makes electrolyzers that produce hydrogen, surged 17%. Tesla, the world’s most valuable automaker, gained 2.5% while newer makers of battery-powered autos, including Fisker and Lucid, also gained. Similarly, engine maker Cummins, which is developing hydrogen-powered systems for truck manufacturers it supplies, rose 1.8% in New York trading.

Beyond mobility companies, investors appear to be shifting broadly to renewable power stocks amid spiking oil prices, said Jeffrey Osborne, an equity analyst for Cowen. Hydrogen, particularly for trucking, may benefit from that volatility.

“With elevated diesel (prices) and a focus on more renewable power around the world, that opens the door for green hydrogen in a bigger way,” Osborne tells Forbes. “The math could more easily pencil out on hydrogen, given the increase in diesel pricing around the world.”

Any bet on Nikola at this point is a longer-term investment as the company won’t yet begin commercial production of hydrogen-fuel Tre FCEV trucks until 2023. In February it began hauling beer for Anheuser-Busch in Los Angeles with two prototype vehicles that the company says can go more than 500 miles between fuelings. Aside from the cost of high-powered fuel cell systems and storage tanks, the supply of hydrogen made from low- or no-carbon sources, such as water and renewable power, remains in short supply. Nikola, Cummins and other companies have announced plans to boost production of the clean fue,l but that will take a year or more to begin scaling up.

The price of global benchmark Brent crude oil traded at about $130 per barrel on Tuesday after Biden said the U.S. was halting imports of Russian oil. The average U.S. price of a gallon of regular gasoline rose about 11 cents to $4.173, according to AAA. The price spiked even higher in California, where motorists are paying an average of $5.44 a gallon.

Gains for Nikola and EV makers is “a knee-jerk reaction in this backdrop of $4-plus gasoline, but EV demand will clearly accelerate in this environment,” said Dan Ives, an equity analyst for Wedbush Securities. “For hydrogen players this geopolitical situation should accelerate adoption.”

Shares of electric vehicle companies have also fallen sharply this year, with Tesla off 33% through Monday’s close and Nikola down 35%. “These stocks are way oversold, and there is some bargain hunting after the massive selloff,” Ives said.