Long before engaging in a shooting war, Russia and Ukraine were in an energy war. Bitter disputes over natural gas supply predate the current battle by almost two decades.

Russia’s escalating invasions have since drawn tightening sanctions on its energy sector, including a decisive rupture with Western Europe in 2022. And over the past two years, Ukraine’s power grid and oil infrastructure have been prime targets for Russian barrages.

Now Ukraine is hitting back at the industry that bankrolls Russia’s war machine. A recent spate of attacks, mostly on Russian oil refineries, has the potential to roil not just Moscow’s war effort but also global energy markets and even U.S. politics.

Ukraine already mounted several attacks on Russian oil depots and refineries in 2023, but the tempo and reach of such strikes have hit new heights this year. Only just recently, Ukrainian drones caused a fire at a refinery in Russia’s Tatarstan region, more than 900 miles from the border.

At least 10 refineries have been hit so far. About 13% of Russia’s capacity has been knocked offline, analysts at RBC Capital Markets estimate. Amid rising prices, Russia last month instituted a ban on gasoline exports. Deputy Prime Minister Alexander Novak has instructed oil producers to prioritize domestic fuel supplies.

Refineries make useful targets in several respects. They are stationary, prominent pieces of infrastructure with the potential for big explosions, useful for propaganda. They are also intricate configurations of pipes, tanks, distillation units and other pieces of equipment that can be hard to replace in light of sanctions.

Perhaps most importantly, damaging them aggravates Russia more than the wider world, at least for now. Russian refineries produce a bit more gasoline than the country needs, leaving little for export. So if refineries are knocked out, the most immediate impact is on Russian drivers.

Russia does produce more than twice the amount of diesel used domestically, with roughly a million barrels a day left over for export. Those exports could also be affected by Ukraine’s strikes, transmitting their effect to global markets. Thus far, however, there is little sign of that. Moreover, if a barrel of Russian crude oil is diverted from a damaged refinery to be exported instead, that would tend to suppress global crude oil prices.

Limiting the international impact is vital, given Ukraine’s dependence on foreign aid. Sanctions against Russian oil, including the price-cap regime imposed by the Group of Seven countries, have generally sought to curtail the Kremlin’s revenue rather than actual barrels. The idea is to force Russian oil to be routed away from traditional markets and increase its logistical costs. That in theory reduces Moscow’s tax take without disrupting global supply or harming the economies of Ukraine’s backers. As often the case with attempts to both have cake and eat it, this hasn’t been terribly successful.

For the embattled Ukrainians, this situation is perhaps tolerable as long as aid keeps flowing. The problem lies there. Republican opposition is holding up a new package from the U.S., the source of about 40% of all military aid to Ukraine so far. Hopes have risen that Speaker Mike Johnson might schedule a vote on aid later this month, but his caucus is more volatile than the oil price itself. Meanwhile, next January the White House could shift back to former President Donald Trump, who isn’t exactly known for his full-throated support of Ukraine.

Stepping up attacks against Russian refineries can be seen as Kyiv’s hedge against not just its enemy’s resilience but also its biggest donor’s ambivalence. Why consider the wallets of American drivers if Washington walks away?

Signs of friction have emerged on this front, with Ukrainian President Volodymyr Zelenskyy vowing to continue the strikes despite criticism from the United States. American President Joe Biden will be mindful of the 15% increase in average pump prices so far this year as the clock ticks toward November, anxious not to risk an inflationary bump this summer. The Energy Department’s recent surprise cancellation of a purchase of crude oil to refill the Strategic Petroleum Reserve — drained in 2022 to offset the initial impact of Russia’s invasion — speaks to such caution.

It is more than warranted. The step-up in Ukraine’s attacks presents two potential risks of real disruption to the global oil market. The first has only a bit to do with Ukraine itself. The day before the attack in Tatarstan, Israel launched an airstrike on Iran’s embassy in Syria, killing several senior military figures; a relatively unusual direct strike in a shadow war long defined by the use of proxies. Iran has vowed revenge and the potential for spiraling into a bigger, direct confrontation is there.

Needless to say, a wider war in the Middle East would jar oil markets immediately. The recent uptick in crude prices, along with an increase in bullish positions in the futures market, reflect that rising risk. As much as Ukrainian refinery strikes seem marginal today, they could wind up compounding a more profound disruption.

The second risk has more to do with Ukraine. With the latest long-range attacks, Kyiv has demonstrated its capability to strike the vast majority of Russia’s refining capacity. More than that, it puts much of the rest of Russia’s oil infrastructure in play. RBC’s analysts calculate that about 60% of the country’s crude oil export capacity is now also within range.

Were Ukraine to successfully launch attacks on shipping terminals, tankers and crude pipelines, this would have a much more immediate impact on the global oil market. Russia exports about 5 million barrels of crude oil and condensate per day, roughly double its exports of refined products. Other crude oil also transits Russia, such as barrels from Kazakhstan that flow into the Black Sea port of Novorossiysk.

As much as any decision by Ukraine to escalate would be shaped by its fortunes on the frontline, the coming battle across the U.S. electoral map will also weigh heavily. Washington may yet walk away from this war. That doesn’t mean it would be immune from the consequences.

Liam Denning is a Bloomberg Opinion columnist covering energy.