Oil rose toward $64 a barrel as investors received a reprieve from growing American crude stockpiles and on signs that trade tensions between the U.S. and China may ease.

Futures gained as much as 0.7 percent in New York. Prices erased most of their losses on Wednesday after data showed supplies stored in U.S. tanks shrank the most since January, in contrast to a forecast for a 2 million-barrel gain. Meanwhile, risk assets rebounded after Chinese and American officials indicated they’re willing to negotiate on escalating frictions, helping ease fears that a trade war may derail the strongest global expansion in years.

The surprise drop in U.S. stockpiles has boosted optimism that surging shale output may not derail OPEC’s efforts to drain a glut. While prices have been buoyed by America’s potential withdrawal from a nuclear deal with Iran that raises the prospect for sanctions against OPEC producer Iran, escalating trade conflict between the world’s two largest economies has kept a lid on prices.

“While there was a surprise drop in U.S. stockpiles, we should note that they have been steadily rising since January this year,” Min Byungkyu, a global market strategist at Yuanta Securities Co., said by phone in Seoul. “Markets from equities to oil now seem to quickly brush off and recover as the trade dispute between the U.S. and China continues.”

West Texas Intermediate for May delivery climbed as much as 42 cents to $63.79 a barrel on the New York Mercantile Exchange, and traded at $63.59 at 7:34 a.m. in London. The contract fell 14 cents to $63.37 on Wednesday. Total volume traded was about 39 percent below the 100-day average.

Brent for June settlement added 28 cents to $68.30 a barrel on the London-based ICE Futures Europe exchange. Prices slipped 10 cents, or 0.2 percent, to $68.02 Wednesday. The global benchmark crude traded at a $4.73 premium to June WTI.

U.S. storage decreased to 425.3 million barrels last week, while outbound shipments of crude expanded to a record, according to the Energy Information Administration’s weekly report Wednesday. The EIA data also showed that American oil production rose to an unprecedented level of 10.5 million barrels a day last week, topping 10 million barrels a day for a ninth week.

Global markets from equities to oil recovered after investor optimism grew that the U.S. and China will step back from the brink of a trade war. The Asian nation on Wednesday said it would levy an additional 25 percent tariff on about $50 billion of U.S. imports to match the scale of proposed American tariffs announced earlier.

The White House’s National Economic Council Director Larry Kudlow spent much of the day Wednesday trying to calm markets, and said the two countries still have time to work out their differences. China’s ambassador to the U.S., Cui Tiankai, also said his first choice would be to consult the U.S. over trade.

Oil-market news:

  • The proposed tariff on China’s imports of American propane probably won’t hurt U.S. companies as much as intended.
  • Kazakhstan’s cash-strapped state oil company generated another $1 billion in prepayments by extending a crude-supply contract with Vitol Group.
  • Gasoline futures rose 0.4 percent to $1.9843 a gallon, after adding 0.1 percent Wednesday.