Oil prices edged higher on Wednesday ahead of a U.S. holiday, after falling steeply a day earlier as worries about a slowing global economy outweighed a decision by OPEC and allies to extend crude output cuts.
Strength in the U.S equities market and data showing U.S. energy firms this week reduced the number of oil rigs operating for the first time in three weeks helped support oil prices.
Each of the major U.S. stock indexes finished at a record closing high, as expectations grew that the Federal Reserve would take a more dovish turn as a raft of data provided more evidence of a slowing economy.
U.S. oil drillers cut five oil rigs in the week to July 3, bringing the total count down to 788, General Electric Co's Baker Hughes energy services firm said in its closely followed report. Record U.S. crude production has pressured prices over the past year.
September Brent crude futures ended the session up $1.42, or 2.3%, at $63.82 a barrel. U.S. crude futures for August delivery settled up $1.09, or 1.9%, at $57.34 a barrel. On Tuesday, both benchmarks fell more than 4% on worries about a global economic slowdown.
Gains were pared after data showed U.S. crude inventories fell by 1.1 million barrels in the latest week, much less than the 3-million-barrel decrease analysts had expected.
"The market is disappointed by a very small crude oil inventory draw. ... The only sign of strength in the market is the continued modest decline of gasoline inventories," said Andrew Lipow, president at Lipow Oil Associates in Houston.
U.S. gasoline futures led the energy complex, rising about 2.5% to settle at $1.9167 a gallon.
"We had a pretty sharp correction yesterday, so after that a little rebound is expected. Globally, the market is concerned about oil demand growth potential," Olivier Jakob of Petromatrix consultancy said.
Trading volumes were subdued ahead of the U.S. Fourth of July holiday on Thursday. About 573,076 lots of the front-month U.S. crude futures contract were traded by 2:45 p.m. ET (1845 GMT), some 65.2 percent of the previous session's volume.
On Tuesday, the Organization of the Petroleum Exporting Countries and other producers such as Russia, a group known as OPEC+, agreed to extend oil supply cuts until March 2020.
"Extending the cut by six or nine months, it doesn't really matter if the level stays the same," Jakob said. "If you really wanted to target stock levels, you would need deeper cuts but Saudi Arabia has already gone beyond its cut target."
The OPEC+ agreement should draw down oil inventories in the second half, boosting oil prices, analysts from Citi Research said in a note.
"Keeping cuts through the end of 1Q aims to avoid putting oil into the market during a seasonal low for demand and refinery runs," they said.
Still, signs of a global economic slowdown hitting oil demand worried investors after global manufacturing indicators disappointed and the United States threatened Europe with more tariffs.
The U.S. trade deficit jumped to a five-month high in May and the ADP National Employment Report showed private payrolls increased far less than economists had expected.
Barclays expects oil demand to grow at the slowest pace since 2011. Morgan Stanley lowered its long-term Brent price forecast to $60 per barrel from $65 per barrel, and said the oil market is broadly balanced.
Crude prices also were pressured by signs of a recovery in oil exports from Venezuela in June and growth in oil production in Argentina in May.