The decision was shocking. But the announcement April 28 that the UAE was leaving OPEC caps years of tension where the desert state chafed under the cartel’s quotas, and recently, encountered severe strain in its relationship with Saudi Arabia, the group’s most potent force by far. Though it had felt strains before, it was the war in Iran that pushed the UAE over the edge. “The war suddenly made job one for the UAE ‘take the money and run,'” says Steve H. Hanke, professor of applied economics at Johns Hopkins University. “First, OPEC stood partially in the way, now the Iran war poses a much bigger danger for a long time to come.”

The UAE didn’t mention the Gulf conflict in its public announcement. Its press release stated that, “The decision reflects the UAE’s long-term strategic and economic vision and evolving energy profile, including accelerated investment in domestic energy production.” Included was a confirmation that the UAE seeks to lift production beyond the OPEC strictures—framed by understatement apparently designed to avoid freaking the oil market. The UAE pledged to bring “additional production to the market in a gradual and measured manner, aligned with demand and market conditions.”

One observer the move didn’t surprise was Hanke, who served on the UAE’s Financial Advisory Council from 2008 to 2014. Years earlier, he had developed an economic model that addressed how fast an oil-rich nation should produce assuming different rates of decline in the “real,” or inflation-adjusted price of crude. That projection specified the rising “discount rates” at which the reserves lost value the longer they stayed in the ground. The faster the projected decline in the dollars a barrel fetched on the world market, the quicker a nation should pump to maximize its profits. Hanke shared his work with the UAE’s economic leaders. “The system showing those optimal pumping rates made sense to them,” says Hanke. “If you think future prices are going higher, you slow down and wait to produce. If you think they’re going lower, you ramp up fast.”

Starting around 2021, the UAE began pushing hard for a much higher share of OPEC’s output. For Hanke, the reason was obvious: Its Abu Dhabi-based government was increasingly concerned about the rise in green energy that threatened a long-running slide “real” fossil fuel prices. In fact, sustainable technologies looked so promising to the UAE that it invested heavily in projects ranging from solar farms to sustainable aircraft fuel to low-emission hydrogen. “That led to the strategy of ‘pump like hell today,'” says Hanke. In that vein, the UAE greatly accelerated its oil investments, and sought to put all that new capacity to work by pressing OPEC to lift its limit around 50% to roughly 5 million B/D. Those demands soured its relations with Saudi Arabia, and the two nations also clashed in their support of warring sides in both Yemen and Sudan.

The haymaker, however, landed when fellow OPEC-member Iran unleashed its drones and missiles on UAE’s oil and gas complex, an offensive that seemed unimaginable before the U.S.-Israeli attacks—even though the Emirates had antagonized Iran by courting both nations, and joining the Abraham Accords in 2020. Iran inflicted severe damage on at least five major UAE facilities, including a drone strike that ignited fires at Ruwais, one of the world’s largest refineries, and another at the key Port of Fujairah oil export hub. While the UAE still manages significant shipments via its pipeline to the Gulf of Oman, the war has crippled its freedom for moving crude and gas from its wells to the world markets.

“The problem’s gone from a long-term decline in the real price, to the possibility that in the future, they won’t be able to sell all, or can only sell much less, because Iran controls the Strait of Hormuz, or periodically takes out part of its infrastructure,” says Hanke. The upshot: The UAE’s discount rate soared overnight. The new math dictates that the that the “present value” of oil produced in the future will be much lower than before the war. In other words, any opportunity to go, go like hell. “The UAE now has a big incentive to tilt oil production towards the present and away from the future,” says Hanke. Leaving OPEC and its quotas opens that door. This war’s full of unforeseen consequences. None bigger than the bombshell on April 28 that this OPEC stalwart for nearly sixty years is bolting.

This story was originally featured on Fortune.com