GENEVA (Reuters) - A trade war between the world’s top two economies cut U.S. imports of Chinese goods by more than a quarter, or $35 billion, in the first half of this year and drove up prices for American consumers, a U.N. study showed on Tuesday.

FILE PHOTO: Chinese and U.S. flags flutter near The Bund, before U.S. trade delegation meet their Chinese counterparts for talks in Shanghai, China July 30, 2019. REUTERS/Aly Song

Beijing and Washington have been locked in a trade feud for the past 16 months although there are hopes that an initial deal offering some relief may be signed this month.

If that fails, nearly all Chinese goods imports into the United States - worth more than $500 billion - could be affected.

U.S. imports from China subject to tariffs fell to $95 billion between January and June from $130 billion during the same period of 2018, the study released by the U.N. Conference on Trade and Development (UNCTAD) showed.

“Overall, the results indicate that the United States tariffs on China are economically hurting both countries,” the report said. “United States losses are largely related to the higher prices for consumers, while China’s losses are related to significant export losses.”

Over time, Chinese companies began absorbing some of the extra costs of the tariffs through an 8% dip in export prices in the second quarter of 2019, but that still left 17% “on the shoulders of U.S. consumers”, said the report’s author Alessandro Nicita, an economist at UNCTAD.

The sector hit hardest by the U.S. tariffs are U.S. imports of Chinese office machinery and communication equipment, which fell by $15 billion. Over time, the scale of Chinese export losses increased alongside mounting tariffs, the study said.

Other countries stepped up to fill most of the gap left by China, the study found. It named Taiwan as the largest beneficiary of “trade diversion”, with $4.2 billion in additional exports to the United States in the first half of 2019. They were mostly office and communication equipment.

Mexico increased exports to the United States by $3.5 billion, mostly agriculture and transport equipment and electrical machinery. The European Union boosted deliveries by $2.7 billion, mostly via additional machinery exports, it found.

“The longer the trade war goes on, the more likely these losses and gains will be permanent,” Nicita said. Not all of Chinese trade losses were picked up by other economies and billions of dollars in trade were lost entirely.

The paper did not analyse the effect of Chinese tariffs on U.S. imports into China because detailed data was not yet available.

It also does not capture the most recent phase of the trade war -- including 10% tariffs on about $125 billion worth of additional Chinese goods imported into the United States that took effect on Sept. 1 -- beyond noting that it is likely to add to existing trade losses.