IT USED to be said that America’s shale producers were the new “swing factor” in global oil markets. It turns out that role is being taken by America’s president.

At a time when oil prices are at three-and-a-half-year highs, markets are being buffeted by three countervailing forces unleashed by President Donald Trump: his geopolitical agenda, particularly sanctions on Iran; his domestic political agenda, to lower American petrol prices before the mid-term elections; and his looming trade war with China. If he does not get his way, he may have a dangerous weapon up his sleeve—America’s Strategic Petroleum Reserve (SPR). His meddling risks making OPEC, the oil cartel that is a focus of his wrath, look like a paragon of predictability.

First, geopolitics. Despite an agreement late last month by Saudi-led OPEC and Russia to increase output by up to 1m barrels a day (b/d), the price of Brent crude, a benchmark, has risen to above $77 a barrel. The proximate cause this week was a brace of supply outages in Libya and Venezuela, both of which are in upheaval. But adding fuel to the price rally is the Trump administration’s pressure on America’s allies to cut oil imports from Iran to zero by November 4th, or risk punishment for violating American sanctions. This is more draconian than expected.

Brian Hook, an official at the State Department, said on July 2nd that more than 50 international firms, including energy ones, had agreed to pull out of Iran. Though America may allow some countries—possibly Turkey, France and others—to reduce imports rather than cut them completely, it will not grant any waivers. According to Clearview Energy Partners, a consultancy, a “zero-barrel” response could see between 800,000 and 1.05m b/d of Iranian crude come off the market, with the squeeze starting in September, 60 days of shipping time before the sanctions kick in.

Mr Trump’s Iranian ambitions are working against his domestic political ones, however. Higher oil prices mean the price of gasoline in America is hovering around $3 a gallon, just as Americans take to the road for the holidays. Those hurt most are drivers on lower incomes, who are more likely to vote Republican in the mid-term elections. Though some Republican states produce oil, and will therefore benefit from higher prices, the president is clearly worried. In an interview on Fox TV aired on July 1st, he ordered OPEC to stop manipulating the market, threatening some of its members with the loss of American protection if they do not.

Mr Trump also tweeted on the need for Saudi Arabia to increase production by up to 2m b/d—an unusually open attempt by an American president to intervene in the nitty-gritty of OPEC policy. The White House later backtracked from his claim that Saudi Arabia had agreed to the request, but not without affirming that the kingdom had 2m b/d of spare capacity.

Whether or not the Saudis can use that buffer is a different matter. Energy Aspects, a consultancy, says that the highest level of production Saudi Aramco, the state-owned oil giant, has tried for any length of time is 11m b/d (it is about 10.3m b/d at the moment). But keeping production at that level for several months would damage its reservoirs. Pumping 12m b/d would also take spare capacity in the global oil market to uncharted lows, leaving it dangerously exposed to supply shocks.

Complicating matters is the imminent risk of an America-China trade war. China has threatened tariffs on American oil imports if retaliation meets more retaliation. And China may pay no heed to American sanctions on Iran, which would further stoke tension between the two.

These factors, some bullish for oil prices, some bearish, may offset each other. But they have already had the unfortunate consequence of putting Mr Trump alongside the rulers of Saudi Arabia and Russia in the driving seat of global oil policy. Shale producers, who cannot respond to price signals anything like quickly enough to please Mr Trump, are sidelined.

He may yet exert his influence even more openly. Analysts predict that if petrol prices continue to rise ahead of the mid-terms, Mr Trump will use a release of up to 30m barrels from the SPR to flood the market. That would be tantamount to launching an oil war against OPEC and Russia, in addition to the trade war. But it cannot be ruled out.