Analysts polled by Reuters had expected a weekly decline in U.S. crude stocks.

“Crude oil processing increased sharply and reached a record level of almost 18 million barrels per day last week,” said Carsten Fritsch, senior commodities analyst at Commerzbank. “But this was not enough to prevent the inventory build. Or take it this way; it prevented an even larger build.”

“Adding to the weakening price backdrop are signs that a deepening trade spat between the United States and China is undermining oil demand.”

Investors are concerned about the world economy as trade disputes between escalate between the United States and its major trading partners.

The OECD’s composite leading indicator, which covers the western advanced economies plus China, India, Russia, Brazil, Indonesia and South Africa, slipped below trend in May and June.

World trade volume growth peaked in January, and since then has nearly halved to less than 3 percent by May, according to the Netherlands Bureau for Economic Policy Analysis.

The United States and China have been locked in a trade battle for months, a dispute that threatens to curb economic activity in both countries.

Chinese oil importers now appear to be shying away from buying U.S. crude oil as they fear Beijing may decide to add the commodity to its tariff list.

Not a single tanker has loaded crude oil from the United States bound for China since the start of August, Thomson Reuters Eikon ship tracking data showed, compared with about 300,000 barrels per day (bpd) in June and July.

Meanwhile, investors were watching the impact of U.S. sanctions on Tehran, which analysts say could remove as much as 1 million bpd of Iranian crude from the market by next year.

BMI Research said oil markets would “struggle for direction, as uncertainty around both the impact on supply from the Iranian sanctions and escalating trade tensions between the U.S. and China persists”.

Reporting by Jessica Resnick-Ault in New York, Christopher Johnson in LONDON and Henning Gloystein in SINGAPORE; Editing by David Gregorio and Marguerita Choy