(John Kemp is a Reuters market analyst. The views expressed are his own)

LONDON, May 9 (Reuters) - President Donald Trump’s decision to withdraw from the nuclear agreement with Iran marks the end of the current output agreement between OPEC and its allies.

OPEC is likely to insist the current agreement remains in effect, at least for now, but the prospective removal of several hundred thousand barrels per day of Iranian exports from the market will require a major adjustment.

Saudi Arabia has already promised to “mitigate” the impact of any potential supply shortages, in conjunction with other suppliers and consumer countries, in a statement released immediately after the sanctions decision.

The kingdom is customarily coy about how it might respond but the prospective removal of Iranian crude from the market will send oil prices sharply higher unless other producers step up to fill the gap.

As a practical matter, only Saudi Arabia, the United Arab Emirates, Kuwait, Russia and the United States have the ability to raise production and exports in the short term.

Saudi Arabia and its close allies Abu Dhabi and Kuwait hold almost all the spare capacity that could respond quickly to a reduction in Iranian exports.

U.S. shale producers could also increase their output but it would take time and their light crude is not a good substitute for heavier Iranian oil.

Russian firms may also hold spare capacity and could certainly increase output over a 12-month horizon. Their crude is a close equivalent to Iranian grades.

The United States and Saudi Arabia appear to have reached a high-level political understanding in which the United States will intensify pressure on Iran in exchange for Saudi Arabia agreeing to help avoid a spike in oil prices.

The existence of an understanding was confirmed by the U.S. Treasury Secretary who told reporters on Tuesday that “we have had conversations with various parties ... that would be willing to increase oil supply”.

In retrospect, the president’s tweet on April 20 blaming OPEC for high oil prices can be seen as part of the negotiating process to reach an understanding with Saudi Arabia.

In effect, the United States agreed to implement tough sanctions, and Saudi Arabia agreed to limit the impact on oil prices.

The outlines of that agreement remain unclear, and may not be entirely clear to Washington and Riyadh, but the understanding is vital to the successful implementation of sanctions.

U.S. gasoline prices are already averaging just under $3 per gallon, the highest level since late 2014, up from $2.50 a year ago.

U.S. politicians will want to avoid being blamed for a further escalation in the run up to congressional elections in November.

Assuming the U.S. sanctions are effective in curbing Iran’s crude exports, Saudi Arabia and its OPEC allies will have to raise their production to make up the shortfall, or risk being blamed for a further rise in motoring costs.

UPDATED DEAL

The original agreement between the Organization of the Petroleum Exporting Countries, led by Saudi Arabia, and other oil exporters, led by Russia, set output levels in December 2016.

The output agreement has already been extended twice, in May and December 2017, and is now scheduled to run until at least December 2018.

Even before the United States decided to withdraw from the Iran nuclear agreement, OPEC’s output agreement was in danger of being overtaken by events.

The collapse in Venezuelan output has reduced production much more than intended and caused global oil inventories to draw down much faster than OPEC predicted at the end of last year.

The result has been a sharp increase in prices, which has been broadly welcomed by OPEC members, especially Saudi Arabia, which needs the revenues to pay for its ambitious transformation programme.

Losing significant volumes of Iranian exports as a result of sanctions will worsen the existing under-supply in the market and cause inventories to decline even faster and prices to rise even higher.

But further significant price increases threaten to complicate OPEC’s strategy by accelerating the upturn in shale drilling, as well as denting the growth in oil consumption.

They also pose a political problem since neither the Trump administration nor Saudi Arabia will want to be blamed for pushing up prices for motorists in the United States and elsewhere.

For all these reasons, Saudi Arabia and other OPEC members will come under intense pressure to raise their output to make up for any loss of Iranian barrels.

In theory, U.S. sanctions on Iran’s oil industry will not be re-imposed for six months to give customers, traders and banks time to wind down their relationships in an orderly fashion.

In theory, too, the United States is open to granting waivers to importers of Iranian crude, provided they show some willingness to reduce their purchases.

But the U.S. Treasury has already made clear it expects importers to start cutting purchases of Iranian crude immediately if they want to obtain a waiver later, according to a briefing note issued by the Treasury on Tuesday.

The result is that sanctions will start to phase in quickly and could start to progressively cut Iranian exports within the next few months, assuming the sanctions are effective.

OPEC members need to start reacting now if they intend to avert an escalation of prices, rather than leaving the decision to December, by which time the market will be exceptionally tight and it will be too late.

Current OPEC and non-OPEC production levels were specified for a world over-supplied with crude. That world no longer exists.

Negotiating a new deal on output levels is likely to prove tricky since OPEC operates by consensus and sanctions pit two of its most important producers directly against one another.

So the existing deal may technically remain in force while members ignore its output levels in practice.

But the U.S. sanctions on Iran, assuming they are effective, mark the end of the current output agreement.

Related columns:

“Saudi Arabia wants higher prices to kick oil addiction”, Reuters, May 3

“Rising oil prices put demand destruction back on the agenda”, Reuters, May 2

“Mission accomplished for OPEC as oil moves from slump to boom”, Reuters, April 24

“OPEC pact likely to evolve rather than terminate”, Reuters, Feb. 24 (Editing by Edmund Blair)