"Looks like OPEC is at it again. With record amounts of oil all over the place, including the fully loaded ships at sea. Oil prices are artificially Very High! No good and will not be accepted!" Trump wrote on Twitter.
It was unclear what triggered the tweet, Trump's first mention of OPEC on social media during his term.
US oil prices are near a three-year high, at close to $70 a barrel, and have been rising since OPEC and non-OPEC producers including Russia cut supply in January 2017 to end a global oil glut and price collapse.
Trump's tweet came shortly after officials from top oil exporter Saudi Arabia said they would like to see prices climb even higher and that they were still far from their goal of ending the supply glut.
The cartel is expected to restrain supply through the end of this year, and possibly into 2019.
Three Saudi officials told Reuters this week they would be happy to see oil hit $80 or $100 a barrel. Higher prices drive up gasoline prices for motorists worldwide and rising energy costs feed inflation. But higher oil prices have also benefited the U.S. energy industry, feeding rapid growth in output from shale fields. US oil output is at record levels.
Despite Trump's comments, oil benchmarks ended the day modestly higher, rebounding from early losses.
Several members of the Organization of the Petroleum Exporting Countries responded to the tweet, saying prices were not artificially inflated.
Delegates at an OPEC/non-OPEC monitoring committee meeting in Jeddah, Saudi Arabia said oil prices were higher partially because of global political tensions, mentioning sanctions on Venezuela, threats to the Iran nuclear agreement, strikes on Syria and saber-rattling over North Korea.
OPEC Secretary General Mohammed Barkindo said the output cut agreement halted the collapse in global oil prices, and is "on course to restore stability on a sustainable basis in the interest of producers, consumers and the global economy."
"We don't have any price objective in OPEC, and not in this joint endeavour with non-OPEC," Barkindo said on Friday, in response to Trump's tweet.
The group is next slated to meet in June to discuss output policy. Ministers from both Iraq and the United Arab Emirates also disagreed with Trump on Friday, with Iraqi Oil Minister Jabar al-Luaibi saying prices are "not very high" and that the market is stabilizing.
Trump gave no details on what action his administration might take regarding oil or OPEC, and the White House did not respond to elaborate on the issue on the record.
"We have a difficult time seeing how OPEC would in any way be swayed here in terms of changing course, in terms of policy," said Michael Tran, commodity strategist at RBC.
OPEC's output fell in March to an 11-month low, according to a Reuters survey. The cartel has targeted the five-year average of inventories in 35 Organization for Economic Cooperation and Development (OECD) countries as a barometer for the deal's success.
As of mid-April, those inventories were 2.85 billion barrels, or 43 million more than the five-year average; a year ago, it was 268 million barrels above that benchmark.
This week, crude futures benchmarks Brent
That has raised fuel costs, with average U.S. prices for gasoline hitting $2.75 a gallon on Wednesday, according to motorist advocacy group AAA, up more than 30 cents from a year earlier and at their highest since July 2015.
Trump is "just trying to relate to his base when it comes to the retail gasoline prices, so he's blaming OPEC for this," said Josh Graves, senior market strategist at RJO Futures in Chicago.
Beyond OPEC's supply management, crude prices have been supported by expectations that Washington will re-introduce sanctions on OPEC-member Iran, and might expand sanctions against Venezuela after that country's presidential election next month.
"If one concern about reinstating sanctions on Iranian oil is the impact that it could have on oil prices, then it could be a preemptive measure to blame OPEC instead," said Antoine Halff, senior research scholar at the Center on Global Energy Policy at Columbia University.
Hedge funds and other speculators hold a record level of bullish bets on Brent, on expectations of further price rises.
The U.S. government cannot legally influence oil prices other than through releasing oil from its strategic reserve which it does occasionally.
This year's budget agreement includes the sale of about 100 million barrels of crude oil - about 15 percent of the reserve - as U.S. oil production recently hit a record at more than 10 million barrels a day. That release is not related to high oil prices, and analysts said it signalled Washington was not concerned about the potential for future global shortages.
"Washington has fully given up this idea of scarcity. You don't get to the point of selling your strategic reserves to balance your budget if you think the world is short," said Kevin Book, managing director at Clearview Energy Partners.