Copper extended its decline to erase all of this year’s gains on surging inventories and signs of weak demand in China, the biggest consumer. The metal used in pipes and power cables lost 0.4 percent to $4,690.50 a metric ton on the London Metal Exchange by 3:19 p.m. in Shanghai, sliding for a fourth day and on course for its weakest close since July 7. Copper is now 0.3 percent lower in 2016, the only LME metal in the red for the year. By comparison, zinc is 43 percent higher. Copper has struggled to make headway as supply outpaces demand. Inventories tracked by the LME have jumped 14 percent in the past two days to the highest in almost seven months. China customs data Wednesday showed imports at a 17-month low, while exports surged 76 percent from a month earlier. “Copper may continue to trend lower as supply remains higher than demand,” Li Ye, an analyst with Shenyin Wanguo Futures Ltd., said from Shanghai. The metal on the Shanghai Futures Exchange closed 1.3 percent lower. Jiangxi Copper Co., China’s biggest producer, said in an earnings report that while low prices had eroded its first-half profit, the market may bottom out soon because of looser global monetary policies. Most other metals fell as the dollar gained, making commodities more expensive in other currencies. Aluminum in London lost 0.2 percent, even after an industry group in China said the country aims to boost usage by almost 20 percent in the next three years. Zinc fell 0.2 percent, retreating from its highest close since May 2015 after a bullish call from Morgan Stanley.