There’s been enormous furor over President Obama’s nuclear deal with the Iranians, and for good reason.

Most commentators and analysts worry about whether Obama and the Europeans have given up too much on sanctions while getting too little in return.

Too few have been focusing on why Iran’s President Hassan Rouhani and the Ayatollah Khamenei have been so desperate to get a deal now.

The fact is, Iran’s leadership is looking at the shifting regional and global energy picture, and doesn't like what it sees.

From that perspective, an enormous opportunity has been squandered, not just for getting Tehran to halt its nuclear program, but for possibly changing the entire balance of economic power in the Middle East.

Why is Iran so worried? First, there's no doubt that America's fracking boom and its return as an energy-producing superpower has the Iranians in a vise.

“It’s pretty clear,” Julius Walker, energy market analyst at UBS, recent told Businessweek, “without the U.S. shale revolution, it would never have been possible” to put the kind of punishing sanctions on Iran we’ve seen in the last few years.

America’s growing production in places like south Texas and North Dakota has stripped away Iran’s ability to blackmail the West by shutting down production and sending oil prices soaring.

Sanctions have cut Iran’s oil exports to about half what they were in 2011, yet there’s been almost no effect on world energy markets thanks to American shale production.

As Walker notes, cutting Iranian exports should have boosted oil prices to $150 a barrel. Instead, America’s contribution of 2 million barrels a day to the market have kept prices hovering between $80 and $100 a barrel.

And Iran’s leverage on oil prices is only going to diminish, as the U.S. moves into position as the world’s biggest oil producer by 2015.

So doing a deal now became imperative, before sanctions permanently wrecked Iran’s position as a major oil exporter — and natural gas exporter in the future.

And here the second big change in the world energy picture hits closer to home, as Israel — the dreaded “Zionist entity” of Iranian rhetoric — prepares to go on line extracting natural gas from the huge fields it discovered in 2009 off its coast and begins sending it to its neighbors and even Europe.

Natural gas is Iran’s other hidden energy resource. The country has the world’s second biggest proven reserves (about 1,046 trillion cubic feet), 15.8 percent of world reserves, but the vast majority of that sits untapped.

A full end to sanctions would bring in a flood of Western companies and engineers to turn Iran's natural gas into a major contributor to the nation’s economic and political fortunes.

Indeed, the same technologies the Israelis are mobilizing in the Mediterranean could open up even larger Iranian offshore reserves in the Persian Gulf and Caspian Sea.

And here’s the real shame about the hasty deal Obama and his cohorts have struck. Continuing or even tightening sanctions could have ultimately forced Iran to make a clear and unambiguous choice: between getting a nuclear bomb, and getting the West — and possibly even, in the best of all possible worlds, Israel — to help Tehran open a brand new chapter in its energy history,(and a new future for its people.

Would Iran have made the right choice? Hard to say. But Obama’s deal certainly sends the opposite message.

That’s why Congress now needs to stay the course on sanctions, not just for the sake of peace and non-proliferation — but, one could argue, for Iran’s own future.

Arthur Herman is a former visiting scholar at the American Enterprise Institute and author of "The Cave and the Light: Plato Versus Aristotle, and the Struggle for the Soul of Western Civilization," now available from Random House.