HOUSTON — When President Trump announced in May that he was going to withdraw the United States from the nuclear agreement that the Obama administration and five other countries negotiated with Iran in 2015 and reimpose sanctions on the country, the decision was fraught with potential disaster.

If Mr. Trump’s approach worked too well, oil prices would spike and hurt the American economy. If it failed, international companies would continue trading with Iran, leaving the Islamic Republic unscathed, defiant and free to restart its nuclear program.

But the policy has been effective without either of those nasty consequences, at least so far.

Nearly two months before American oil sanctions go into effect, Iran’s crude exports are plummeting. International oil companies, including those from countries that are still committed to the nuclear agreement, are bailing out of deals with Tehran.

And remarkably, the price of oil in the United States has risen only modestly while gasoline prices have essentially remained flat. The current global oil price hovers around $80 a barrel, $60 below the highs of a decade ago.