If Trump ends the deal, the U.S. would sanction Iranian oil.
"Some may interpret this as a pre-May 12 Iran decision message," said Daniel Yergin, vice chairman of IHS Markit. Yergin said if the U.S. reinstates Iranian sanctions, it would not have the impact it did in 2012, when the U.S., then with allies, sanctioned Iran. But it could remove several hundred thousand barrels from the market.
The appointment of John Bolton, as Trump's new national security advisor, raised speculation that the president could be convinced to withdraw from that agreement.
U.S. allies are opposed to the U.S. exiting the deal, which bans Iran's nuclear program in exchange for the removal of stiff sanctions that severely limited its ability to sell oil. French President Emmanuel Macron is scheduled to visit the U.S. next week, and he is expected to encourage Trump to remain in the deal.
"He sees the oil price going up. He knows it's not good for his approval rating. It's not good for the economy. Sentiment is the first thing to take a hit when gasoline hits $3 a gallon," said John Kilduff of Again Capital.
Gasoline prices have been jumping, and are up 20 cents in the past month. Prices could be at four-year highs this summer, reaching $3 a gallon or more across a good chunk of the country. Analysts say any serious refining outages could send gasoline prices spiking.
But Trump's tweet could have interesting ramifications. It was aimed at a more complicated group than the Organization for Petroleum Exporting Countries of 40 years ago that was seen as a price manipulator and the bane of former President Jimmy Carter when it cut supplies to the U.S. in the 1970s.
OPEC was nearly written off two years ago as oil prices cratered. But the cartel created an alliance with Russia and other non-OPEC producers. Together, Russia and Saudi Arabia lead this alliance and have managed to keep supply from the market, bringing a massive global oil glut into balance in 16 months even as U.S. production has surged to record levels.
Both Russia and Saudi Arabia would like to continue their partnership beyond the expiration of their production deal this year, and were meeting in Saudi Arabia Friday while Trump was tweeting.
When asked about the tweet, Saudi Arabia Energy Minister Khalid Al-Falih said: "Markets should determine price."
Helima Croft, head of global commodities strategy at RBC, said Trump is now signaling concern about the oil market, and that has spurred speculation that he could take oil from the U.S. Strategic Petroleum Reserve.
"I can understand Trump's anxiety…He's in a position to be concerned about higher gasoline prices," said Croft. "He is a wild card. We just don't know what he's going to do. The Bolton appointment would signal if we took him at his word, we're out of the deal but could flip at the last minute based on North Korea considerations. If he flips, it's a stay of execution but the [Iran deal] is only getting a stay of execution."
Trump is expected to meet with North Korean leader Kim Jung Un to discuss North Korea's nuclear program in June, and he could put off a decision on Iran until the next deadline in September.
Yergin said the SPR is supposed to be tapped for emergencies, and U.S. oil production and supplies are strong. "The SPR is supposed to deal with physical shortages, not managing the market," he said.
Trump has put himself right in the center of the debate about whether global supply is coming into balance and whether rising prices are justified. The U.S. added to the geopolitical premium when Trump decided to retaliate against Syria's chemical attack on its citizens.
A news report this week suggesting Saudi Arabia would not mind seeing prices in the $80 to $100 a barrel range helped send prices even higher, but analysts say $100 is unlikely without a sudden loss of significant supply, since it would dampen demand and ultimately send prices lower.
There is also the factor of growing U.S. production, which has jumped to a record 10.5 million barrels a day. Some shale drillers can produce oil at $20 to $30 a barrel, and higher prices could bring much more oil to market.
Scott Sheffield, the chairman of Pioneer Natural Resources, told an energy conference at Columbia University on Thursday that oil should be in the $55 to $65 per barrel range. "I don't think it does anyone any good to talk about $100 crude," he said.
In addition to Iran, Trump could also make a decision following Venezuela's elections to sanction its oil sector, another move that could send oil prices higher. Venezuelan production has been dropping rapidly, as its operations deteriorate and staff leave, and that reduced output has also been helping to balance the oil market.
The U.S. and other countries have expressed concern that the May 20 elections in the country will be an unfair effort to consolidate President Nicolas Maduro's power.
Trump's tweet also took aim at a key ally of the U.S. and longtime adversary of Iran – Saudi Arabia. Crown Prince Mohammed Bin Salman, known as MBS, is trying to move the country away from its dependence on oil, and he just spent several weeks in the U.S. courting U.S. investors and considering investments.
"He had Mohammed Bin Salman in the oval office with a poster board of weapons and was making a lot of asks financially. This is a question for Trump, does he want Saudi Arabia to buy those weapons? Does he want the Saudis to invest in U.S. infrastructure?" Croft said.
Trump's first state visit was to Saudi Arabia and he is viewed as having a close relationship with MBS and his father King Salman. Croft said the U.S.'s closest Gulf allies, Saudi and the United Arab Emirates, are both the face of the new OPEC.
"If he's really concerned about OPEC policy, he should pick up the phone and call Mohammed Bin Salman," she said.