Copper prices extended gains on Thursday as funds chased the market higher after a takeover bid by BHP for Anglo American, which analysts said was focused on copper.

Three-month copper on the London Metal Exchange (LME) gained 1.5% to $9,916 a metric ton in official open-outcry trading, moving closer to the $9,988 two-year peak touched on Monday.

BHP Group bid $38.8 billion for Anglo American on Thursday, seeking to forge the world's biggest copper miner.

"The BHP news is most certainly giving some additional attention to copper. If BHP wants copper, then I'm sure traders and investors want it as well," said Ole Hansen, head of commodity strategy at Saxo Bank in Copenhagen.

"We're again within striking distance of $10,000, the magical level that traders will be chasing in a market that has rallied perhaps a bit too strongly compared with what the underlying fundamentals are justifying."

LME copper has gained 11% this month and about 15% this year.

In China, the Yangshan premium assessed by SMM has dropped to zero for the first time on record, indicating weak appetite to import copper into China, the world's biggest metals consumer.

The most traded June copper contract on the Shanghai Futures Exchange (SHFE) closed 1.9% up at 80,160 yuan ($11,061.13) a ton.

"Fund buying was still relentless during the U.S. session ... and after a slightly weaker opening, Asian funds seem to be follow through, too, on this wave of buying," one trader said.

Also supporting the market was a weaker dollar, making commodities priced in the U.S. currency more expensive for buyers using other currencies.

Goldman Sachs analysts forecast the global refined copper market is likely to show a deficit of 428,000 tons in 2024 and they expect copper prices in London to hit $12,000 a ton within the next 12 months.

LME aluminium added 0.3% in official activity to $2,609.50 a ton, nickel rose 0.7% to $19,070, zinc climbed 2.2% to $2,867, lead was up 0.8% at $2,215 and tin advanced 1.3% to $32,250.

($1 = 7.2468 yuan)

(Reporting by Eric Onstad; Additional reporting by Mai Nguyen in Hanoi Editing by David Goodman)