The price of gold rose above $500 an ounce for the first time since 1987 on Tuesday, extending a rally that has defied market tradition and perplexed some traders and money managers.

Gold for February 2006 delivery closed at $503.50 an ounce in regular New York trading on Tuesday, up 20 percent over the past six months. The contract for December delivery closed at $499.10.

Investors traditionally pile into gold as a safe haven when the dollar drops, inflation rises and economic calamity looms. The trouble is, none of those things appears to be happening.

The dollar is rising, inflation appears in check and the U.S. economy, while shaky in spots, does not seem headed for immediate disaster. Economic reports released Tuesday were uniformly rosy. Consumer confidence, demand for big-ticket durable goods and new-home sales all were up.

So why is everyone so bullish on bullion?

Answers from commodities traders and money managers vary. Among the most popular is that oil-rich countries in the Middle East are using gold as a new place to park some of their vast energy profits, while central banks in Asia and elsewhere are diversifying foreign reserves by moving money out of U.S. Treasuries and into gold. Officials in Russia, South Africa and Argentina have all said in recent weeks that they may increase their gold reserves.

"A number of second- and third-tier central banks have examined their assets and decided that they are a little light on gold and perhaps they should go pick some up," said Dennis Gartman, an economist and editor of the Suffolk, Va.-based Gartman Letter, which analyzes investment trends.

The run-up has exasperated Gartman, who usually warns people away from gold because it has a long history of burning individual investors who try to guess which way prices will go. "I've been bullish on gold lately and I hate myself for it," Gartman said. "Usually I don't like the gold bugs."

Gartman said he thinks gold prices have probably peaked, at least for the moment. But he expects gold to go higher in the long term, given the growing worldwide demand, especially from India and China, for all kinds of commodities, including gold, copper and platinum. Worldwide gold production has also been dropping. Output in South Africa, the world's largest gold producer, fell 15.4 percent in the 12 months ended in September, the biggest such drop in nine years.

But Richard Bernstein, chief U.S. strategist at Merrill Lynch & Co., said the surge in gold prices is not based on fundamentals of supply and demand. "People have to remember that the number one player in all commodities right now is hedge funds," he said. "It's all speculation. In gold, it's an inflation trade. Hedge funds are long gold and short Treasury notes."

"Long" means betting that a commodity's price will rise. "Short" means betting it will fall. Hedge funds are lightly regulated investment vehicles that cater mostly to sophisticated, wealthy investors but are increasingly used by average investors and pension funds.

Hedge funds typically bail out of a trade after it starts to become popular with the general investing public, and there are indications that that could be happening with gold. For example, the assets of StreetTracks Gold Shares, an exchange-traded fund that uses investors' money to buy gold bullion, rather than futures contracts, have exploded to $3.6 billion in its first year of existence.

Gartman, despite his recent bullishness on gold, said such figures worry him. "If somebody is thinking of investing in gold right now, I would tell them to go sit down, have a cup of coffee and take a deep breath because I wouldn't be surprised to see gold back down to $400 or $450 by the end of the year," he said. "The very fact that this is making the front page of business sections should give people a lot of caution."

A customer shops yesterday at a goldsmith in San Francisco. Gold prices rose 20 percent in six months.