The worldwide oil benchmark, Brent crude, was trading around $77.49 per barrel as of 8:20pm Nigerian time on Thursday.
West Texas Intermediate was down 1.2% to $73.30 a barrel.
In response, a senior Iranian official accused Mr Trump of sending prices even higher through his tweets.More news: Belgium beat England 1-0, win Group G
Trump indirectly linked USA foreign policy to his demand, saying the US defends some oil producing countries "for very little" money.
Rising gasoline prices could create a political headache for Trump before November mid-term congressional elections by offsetting Republican claims that his tax cuts and rollbacks of federal regulations have helped boost the U.S. economy.
OPEC agreed with Russian Federation and other oil-producing allies last month to raise output from July, with Saudi Arabia pledging a "measurable" supply boost but giving no specific numbers.
Iran, OPEC's third-largest producer, is facing U.S. sanctions on its oil exports that are prompting some buyers to cut purchases. Suggesting that OPEC countries should produce more crude oil to increase supply and lower prices if they want to keep America's strategic partnership, he said: "This must be a two-way street". If the USA succeeds in blocking Iran from exporting its oil, OPEC would struggle to offset the missing barrels.
At their meeting in Vienna last month, OPEC countries and key ally Russian Federation said they will raise production by a million barrels per day, but analysts are concerned it may not be enough for oil prices to spiral out of control, at least until new US shale production comes on stream.More news: Zlatan Ibrahimovic tips Sweden for World Cup glory
Oil held near US$74 (RM299) a barrel amid estimates that United States crude inventories declined for a fourth week, compounding concerns that global markets are growing increasingly tight.
"We are making meaningful changes to our supply forecasts: we see lower output from Iran, Libya and Angola ahead, but increase our forecasts for Saudi Arabia", wrote Martijn Rats, equity analyst at Morgan Stanley. Gasoline prices are far from the only influence on voters' opinions, with other issues such as immigration policy and the environment also factoring in. Saudi Arabia expressed its readiness to "compensate for any potential shortage of supplies".
"Your tweets have driven the prices up by at least US$10 per barrel", Iran's OPEC governor Hossein Kazempour Ardebili said in a message to Trump, carried by Iranian Oil Ministry's Shana news service.
Recent price rises have also been spurred by a US announcement that it plans to re-introduce sanctions against Iran from November, targeting oil exports. "If supply doesn't rise, we expect Brent prices to touch $85 by year end as markets will be in a deficit", Valecha said.More news: Japanese doomsday cult leader executed for 1995 sarin gas attack in Tokyo