Gold gained in choppy European trade on Thursday as a weaker dollar and bargain hunting lifted the metal closer to record highs.

Spot gold fell early on as low as $866 an ounce but then recovered to $886.30. It was quoted at $883.50/884.30 an ounce by 1513 GMT, against $877.70/878.50 late in New York on Wednesday, when it hit a record high of $891.40.

It's partly dollar-related. Buying also came in when we moved below $880 as some people considered that level is a good opportunity, said Frederic Panizzutti, analyst at MKS Finance.

It looks that the $900 level is very close now and might be an imminent target in the next couple of days. There are many supportive factors. The dollar is weak and we have the beginning-of-the-year asset reallocation.

The euro climbed against the dollar after European Central Bank President Jean Claude-Trichet flagged more interest rate increases in the euro zone, citing lingering inflation pressures.

A weaker dollar makes gold cheaper for holders of other currencies and often lifts bullion demand.

Gold, which gained more than 30 percent in 2007, entered the new year on a firm note, rising 6 percent on speculative buying ignited by a struggling dollar and record high crude oil prices.

Gold prices appear to be largely taking their direction from dollar movements and investment demand is likely to continue to underpin prices, Suki Cooper, precious metals analyst at Barclays Capital. said.

Safe-haven buying, triggered by inflationary concerns, geopolitical tensions and broader market concerns, has the potential to buoy prices further in the forthcoming weeks, she said, but added the metal might consolidate in the near term.

Recent grim U.S. manufacturing and employment data has intensified the likelihood the U.S. Federal Reserve will cut interest rates by half a percentage point later this month.

LONG-TERM TREND

In other bullion markets, Shanghai gold futures fell 3.7 percent as some investors sold positions a day after the contract rallied 6.3 percent at its debut.

Tokyo gold futures reversed gains on firming yen and profit taking. The key gold futures contract for December 2008 delivery

ended 17 yen per gram lower at 3,117 yen.

U.S. gold futures changed course, with the February contract up $2.4 an ounce at $884 after early losses.

Analysts said gold was expected to jump in the longer term.

We forecast that gold can trade higher from current levels and see the metal trading to as high as $1000/oz at some point this year, John Reade, head of metals strategy at UBS Investment Bank, said in a market report.

But we also see gold ending 2008 somewhat lower than current levels due to our view that the dollar will firm in the second half of 2008, at least against European currencies.

In industry news, South Africa's gold output fell 12.7 percent in November from a year earlier, tightening supplies in the world's top producer of the metal.

Gold production has been on a downward slope in South Africa, tumbling by over 50 percent over the past decade, as high-grade mines run out of ore and firms grapple with more difficult and high-cost underground operations.

Turkey's gold imports could rise around 20 percent in 2008, shrugging off record high prices, as physical demand remains robust, a senior official at Istanbul Gold Exchange said.

Platinum dipped to $1,542/1,547, down from $1,550/1,554 an ounce in New York on Wednesday, when it hit a record of $1,560. Palladium dropped to $371/375 an ounce from $373/377, while silver was flat at $15.67/15.72.

Polymetal, the world's fifth-largest silver miner, said it had ended a long-term hedging agreement that had limited profits by requiring it to sell most of its silver at below market price.

(Additional reporting by Lewa Pardomuan in Singapore)

(Editing by Chris Johnson)