* Gold runs into heavy resistance at session-high $844
* Bullion dented as dollar turns higher, crude falls
* Physical demand for coins, bars remains firm (Recasts, updates with quotes, closing prices, market activity, adds NEW YORK to dateline)
By Frank Tang and Jan Harvey
NEW YORK/LONDON, Aug 28 (Reuters) - Gold ended higher on Thursday but fell from session highs as crude oil prices fell sharply and the dollar retraced early losses.
Heavy selling emerged after bullion scaled $844 an ounce and then ran into a wall of chart-based resistance.
Gold <XAU=> was at $831.45/832.65 by New York's last quote at 2:15 p.m. EDT (1815 GMT), up from $826.05/827.45 an ounce late on Wednesday.
Strong physical demand after gold's recent sharp price fall helped push prices over $840 an ounce in early trade.
"Gold is being driven by oil and the higher euro-dollar again," said Commerzbank senior trader Michael Kempinski.
"There is still some physical demand around, which is pretty good," he added.
Oil retreated after the U.S. government and the International Energy Agency pledged to release emergency stockpiles if Tropical Storm Gustav disrupted U.S. oil production. [
]U.S. gold futures for December delivery <GCZ8> settled up $3.20 at $837.20 an ounce on the COMEX division of the New York Mercantile Exchange.
Leonard Kaplan, president of Prospector Asset Management, said that gold futures slid after running into strong resistance at $850 an ounce, and a near-term dollar rally could send gold futures back down to the area between $815 and $820.
However, analysts said inflation fears based on rising energy prices should still boost gold.
"Oil at $118-119 a barrel is still extremely expensive and is still very much an inflationary pressure in the market, which is certainly supportive of gold," said Simon Weeks, director of precious metals at the Bank of Nova Scotia.
On Thursday, bullion was weighed by a higher dollar, which reversed its initial weakness against the euro. [
]UBS issued a buy recommendation for gold on Thursday, saying three key conditions it was watching in the gold market -- investor positioning, fundamental demand and the dollar -- have all been satisfied.
The bank reiterated its $850 an ounce one-month price target for gold and its three-month target of $900 an ounce.
"If we beat $846 and hold over it, then we have a good chance of seeing UBS' $850 and beyond," said one London-based gold trader.
PHYSICAL DEMAND STRONG
Investor demand for coins and bars and expectations of increased jewelry buying going into the peak-demand autumn festive season in Asia also are supporting gold prices.
Silver <XAG=> tracked gold to end higher at $13.65/13.71 an ounce from $13.49/13.55 an ounce late in New York on Wednesday.
Among other precious metals, spot platinum <XPT=> tracked gold up nearly 4 percent to a session high of $1,488.00, before easing to finish at $1,466.50/1,486.50 an ounce from its Wednesday U.S. finish of $1,434.00/1,454.00.
Spot palladium <XPD=> ended higher at $289.00/297.00 an ounce from its previous close of $288.50/296.50 an ounce.
Both metals have suffered from expectations that car demand will slow as the global economy falters, cutting demand for the PGMs as components in autocatalysts.
However, Impala Platinum's chief executive on Thursday cited strong demand as a key driver of platinum prices, which he said he expects to trade at $1,400-1,600 an ounce over the next six to 12 months. [
] (Editing by David Gregorio)