U.S. crude closed roughly flat on Wednesday, giving up gains after the government reported another weekly build in crude inventories and a survey suggested OPEC output rose this month.
Brent futures were up 12 cents to $39.26 a barrel, after hitting a session peak of $40.61.
U.S. crude settled at $38.32 a barrel, up 4 cents, or 0.1 percent, having earlier traded as high as $39.85.
U.S. crude inventories rose 2.3 million barrels in the last week, the U.S. Energy Information Administration reported. That was less than the 3.3 million-barrel build analysts had expected.
Still, oil bulls were disappointed because the build came even as refinery utilization rates rose 2 percentage points to 90.4 percent of total capacity, the highest rate seasonally since 2005.