NEW YORK (Reuters) - Oil futures were mixed on Wednesday as a Turkey-launched offensive in Syria and hopes of progress in ending the U.S.-China trade war supported oil, but a build in U.S. crude inventories held prices back.

FILE PHOTO: Crude oil storage tanks are seen from above at the Cushing oil hub, in Cushing, Oklahoma, March 24, 2016. REUTERS/Nick Oxford/File Photo

Brent crude LCOc1 settled at $58.32 a barrel, up 8 cents, while U.S. West Texas Intermediate crude CLc1 settled at $52.59 a barrel, down 4 cents.

Later, prices fell from settlement levels after Chinese officials said Beijing has lowered expectations for progress at the trade talks this week. Negotiators from the world’s top two economies meet in Washington on Thursday in the latest effort to hammer out a deal.

Turkey launched a military operation against Kurdish fighters in northeast Syria, President Tayyip Erdogan said, adding the offensive was aimed to eliminate a “terror corridor” along the Turkish border.

Analysts said the attacks could affect the economy of the oil-producing Kurdistan region in Iraq and boost energy prices.

Prices pared gains after U.S. President Donald Trump said the assault on Syria was “a bad idea” not backed by his administration.

Also pressuring prices, U.S. crude inventories grew 2.9 million barrels last week, the Energy Information Administration said, more than double analysts’ expectations for an increase of 1.4 million barrels.

U.S. crude oil production rose last week to a record of 12.6 million barrels per day.

“Weakening oil demand concerns were further supported today by a larger than expected increase in U.S. crude stocks,” said Jim Ritterbusch, president of oil trading advisory firm Ritterbusch and Associates. “Demand from the refiners has seen a larger seasonal decline than widely anticipated.”

U.S.-China trade tensions rose this week as Washington imposed visa restrictions on Chinese officials and placed some Chinese companies on a blacklist.

China’s comments late on Wednesday mitigated hopes for a deal to end the long-running trade war after reports in Bloomberg and the Financial Times had spurred optimism for a deal.

“Crude oil has, just like other riskier assets, received a boost from news that China is open to accept a partial trade deal,” Saxo Bank commodity strategist Ole Hansen said.

Commerzbank analyst Carsten Fritsch said if the U.S.-China talks fail, “the oil price risks suffering a renewed slide because concerns about demand would then increase considerably again, especially looking ahead to the coming year.”