President Donald Trump withdrew the U.S. from the Iran nuclear deal Tuesday, May 8, which could prove costly to American consumers because exiting the deal may prompt oil and gasoline prices to rise.

The president announced shortly after 2 p.m. his decision to withdraw the U.S. from the Iran deal, more formally known as the Joint Comprehensive Plan of Action, or JCPOA. The U.S. will also reinstate all sanctions it had waived as part of the nuclear accord.

The 2015 deal, which was the Obama administration's signature foreign-policy achievement, was an international agreement that lifted U.S., U.N. and European Union sanctions against Iran in exchange for the country accepting limits on its nuclear program and allowing inspections of its nuclear facilities.

Trump has called Iran deal the "worst deal ever," even though international inspectors have not found that Iran committed any significant violations. Given the president's prior language and the fact that the announcement came ahead of the May 12 deadline, Trump was largely expected to withdraw from the deal.

"What this represents is the U.S. getting out of the agreement that was effectively broken by Iran," Boris Epshteyn, a former special assistant to President Trump who is now the chief political analyst at Sinclair Broadcast Group, told TheStreet. "Iran continues to be a strong destabilizing force in the world." 

European signatories, including Germany, France and Britain, had been strongly urging Trump to honor the agreement, to no avail.

French President Emmanuel Macron tweeted that key U.S. allies "regret" Trump's decision to leave the agreement, saying the "nuclear non-proliferation regime is at stake." 

Former President Barack Obama said Trump's decision regarding the Iran nuclear deal is "a serious mistake." 

Even some congressional Republicans weren't pleased with the decision today. U.S. Senator Bob Corker (R-Tenn.), chairman of the Senate Foreign Relations Committee, said it was "disappointing that the administration was unable to reach an agreement with our allies, specifically to remedy the 'sunset' provisions that allow Tehran to significantly ramp up its nuclear enrichment activity less than a decade from now."

Iranian state television, meanwhile, said the decision to withdraw the U.S. from the deal was "illegal, illegitimate and undermines international agreements," according to a Reuters report.  

"If they act rationally, Iran would come to the table and begin discussions," Epshteyn said. "I assume that back-channel discussions will start immediately."

Still, with the deal jettisoned, gas prices may move higher by as much as 25 cents per gallon, Patrick DeHaan, a senior petroleum analyst at GasBuddy, a firm that monitors gasoline pricing, told TheStreet via email.

Oil pared earlier losses as uncertainty about Trump's decision dissipated. U.S. benchmark West Texas Intermediate crude contracts for June delivery tumbled 1.3% to $69.81 at 3:12 p.m. New York time. Prices had been above $70 on Monday for the first time since 2014. Brent crude, the global benchmark, dropped 0.6% to $75.71.

Because the president ran on withdrawing from this deal, the markets had this move priced in, Epshteyn said.

The sanctions, however, pose the key risk to consumers as they could limit oil exports, which would likely boost prices. But the effect of the sanctions may not be felt immediately. 

"If sanctions are re-imposed, the impact on the oil market may not be immediate and we tentatively expect that several hundred thousand barrels of Iranian exports could eventually be at risk," said Goldman Sachs analysts, including Damien Courvalin and Jeffrey Currie, said in a research note prior to the announcement.

The last time Iran was subject to international sanctions, between 2010 and 2016, the OPEC member's oil exports fell from 2.2 million barrels to 1.1. million barrels, according to Credit Suisse.

"We think the ultimate potential cut to Iranian exports/production will likely be about 'goodwill' from other countries (e.g. Japan, South Korea, India, Taiwan, etc.) towards the U.S., but our best guess is an approximately 200 thousand barrels impact," said Credit Suisse analyst William Featherston.

A six-month loss of 250 thousand barrels per day of Iran supply "could support prices by $3.50 a barrel if other OPEC members do not respond to offset it," Goldman's Courvalin and Currie said.

"In fact, growing geopolitical tensions in key oil-producing countries like Iran, Saudi Arabia, Venezuela, Libya and Nigeria create risks of additional production losses in the face of depleted inventory buffers, leaving price risks to our summer $82.50 per barrel Brent forecast skewed to the upside," the Goldman analysts said. 

-- This story has been updated to include reaction from U.S. allies, former President Barack Obama and former Trump aide Boris Epshteyn.