By Dan Molinski
-- Oil prices rose Wednesday as geopolitical tensions and higher stock prices on Wall Street offset bearish data showing U.S. oil inventories are at a 20-month high.
-- West Texas Intermediate futures, the U.S. oil benchmark, ended 0.4% higher at $62.02 a barrel on the New York Mercantile Exchange.
-- Brent crude, the global oil benchmark, closed 0.7% higher at $71.77 a barrel on London's Intercontinental Exchange.
Geopolitics: Oil prices have fallen in each of the past three weeks. They are showing some upside this week as investors inject a risk-premium into crude prices due to rising tensions between Iran and the U.S. and its allies that could disrupt global oil supplies.
"Plenty of risk and questions remain surrounding attacks on oil infrastructure connected to the Hormuz Strait. Following sabotage efforts against Saudi and U.A.E. tankers in the region, a drone attack against a critical Saudi pipeline raises speculation of a more coordinated and particularly oil-focused operation," said Robbie Fraser, senior commodity analyst at Schneider Electric in Louisville. "The damaged pipeline in question is a key link in mitigating some of Saudi's high reliance on the Hormuz Strait to export crude; an issue that has been in heavy focus following recent threats from Iran."
Still, analysts also noted the reported attacks and rising rhetoric don't appear to be causing any actual supply problems, yet. "To see price supported, we need to see supply disruption and we haven't seen that even after yesterday's attacks," said Giovanni Staunovo, a commodity analyst at UBS Wealth Management. That said, "most of the oil market's spare capacity sits in the region, so some risk will probably be priced in."
Inventories: Oil markets saw very little selling pressure Wednesday despite a weekly report from the Energy Information Administration showing U.S. commercial inventories of crude oil rose by 5.4 million barrels to 472 million barrels, the highest total since September 2017. Total U.S. stockpiles of crude oil and fuels also rose sharply, to a 19-month high of 1.27 billion barrels, but U.S. oil production fell by 100,000 barrels a day to 12.1 million barrels a day.
Dominick Chirichella, director of market insights at DTN, said investors may have shrugged off the inventory data given geopolitical tensions and some easing of worries over U.S.-China trade negotiations.
"From a macro perspective, the EIA report was obviously bearish," Mr. Chirichella said. "But there's a lot happening right now geopolitically, and equities seem to be recovering some after the negative reaction earlier in the week to U.S.-China trade talks."
Analysts said investors were also willing to overlook another bearish U.S. inventory report given the higher-demand summer season is right around the corner. "Oil futures are shrugging off the big build in inventories in anticipation that refinery utilization will pick up into the driving season and burn off excess supplies," said Phillip Streible, senior market strategist at RJO Futures in Chicago.
Global Supply: Oil markets also focused Wednesday on the International Energy Agency, which said global oil supply dropped in April as falling production from sanction-hit Iran and dwindling supply in non-OPEC nations buoyed crude prices to a five-month high. In its closely watched monthly oil-market report, the IEA said the world's total oil supply fell by 300,000 barrels a day month-on-month to 99.3 million barrels a day. That is roughly 3 million barrels a day below November 2018 highs, but an on-year rise of 775,000 barrels a day, the agency said.
-- Baker Hughes is due to release its weekly rig-count report on Friday at 1 p.m. ET.
--David Hodari contributed to this article.
Write to Dan Molinski at Dan.Molinski@wsj.com