Oil rose as a forecast decline in U.S. crude inventories countered pessimism driven by a surprise contraction in American manufacturing and a warning to China from President Donald Trump.

Futures in New York climbed as much as 1% after closing 2.1% lower Tuesday. American stockpiles fell for a third week by 3.45 million barrels last week, a Bloomberg survey showed before official data due Thursday. That came after a U.S. factory gauge fell to its weakest level since 2016 and Trump tweeted that it will be tougher for China to secure a trade deal if it waits until he wins the 2020 U.S. presidential election. Elsewhere, financial assets rose on a report that Hong Kong Chief Executive Carrie Lam will formally withdraw a controversial bill that would have allowed extraditions to China.

Crude has fallen around 18% from a high in late April as the trade war escalated and its toll on the global economy became more apparent. Still, that has come against a backdrop of output curbs by the Organization of Petroleum Exporting Countries and its allies that has helped to tighten supply this year, with both Brent and WTI currently in a bullish backwardation structure that indicates scarce supplies.

“It’s all about the economy isn’t it,” says PVM Oil Associates analyst Tamas Varga. “The fundamental backdrop is not bad in oil for the rest of the year and it’s reflected in the structure of the market as well.”

WTI for October delivery rose 51 cents, or 1%, to $54.45 a barrel on the New York Mercantile Exchange as of 11:36 a.m. in London. Brent for November settlement added 37 cents, or 0.6%, to $58.63 a barrel on the ICE Futures Europe Exchange. The global benchmark crude traded at a $5.49 premium to WTI for the same month.

Trump sought to prod China into doing a trade deal before the presidential election next year as the two sides struggled to agree on the schedule for a planned meeting later this month. “Think what happens to China when I win,” he said in a tweet Tuesday. “Deal would get MUCH TOUGHER!”

The Institute for Supply Management’s purchasing managers index fell to 49.1 in August, weaker than all forecasts in a Bloomberg survey of economists, data released Tuesday showed. Readings below 50 indicate the U.S. manufacturing economy is generally shrinking.