Gold prices rallied more than 2 percent to a record highs on Friday as investors sought refuge from a second day of hefty losses on the stock markets, hurt by deepening concerns over slowing economic growth and the outlook for euro zone banks.

A raft of weak economic data this week has sparked heavy selling of equities and cyclical assets like industrial commodities. European shares extended losses on Friday after posting their biggest one-day fall since March 2009 on Thursday.

At the moment the market is just looking for relative safe havens, said Mitsui Precious Metals analyst David Jollie. You can see that in the sell-offs across equity markets overnight. The strength of gold is the other side of the coin from that.

Spot gold was up 2.1 percent at $1,862.26 an ounce at 0918 GMT, having peaked at $1,867.30 an ounce. It is on track for its biggest one-month rise in nearly 12 years in August and is up 31 percent so far this year.

Germany's blue-chip Dax index slid 4.1 percent to a 21-month low on Friday, while Britain's FTSE 100 fell below the 5,000 mark. Investors spooked by the slide flocked to government bonds and gold as a haven from risk.

German government bonds pushed higher and looked set to scale new record peaks as shares tumbled. U.S. Treasuries, another perceived safe haven, also rose.

Most raw materials also fell. Oil tumbled, with U.S. crude futures down nearly $3 a barrel and Brent crude off 1.7 percent, while base metals also declined.

As long as uncertainty on financial markets remains high and the situation does not calm, gold should retain its status as a store of value and the price should continue to climb, said Commerzbank in a report on Friday.

BROAD-BASED SURGE

Gold's surge was broad-based, with the precious metal hitting record highs in dollars, sterling, euros, yen and, for the first time since mid-2010, Swiss francs.

Gold prices have rallied sharply in the safe-haven franc since the Swiss National Bank announced fresh measures to counter strength in the currency on August 10.

It held close to its record even as the Swiss franc rose, benefiting from demand for currencies perceived to offer a safe haven. Its gains were capped by ongoing speculation Swiss authorities will again step in to curb the currency's strength.

The euro meanwhile fell broadly on Friday on the back of a sell-off in European shares, after a raft of weak U.S. economic data and concerns about European banks drove investors away from stocks and into U.S. Treasuries. The dollar, the world's most liquid currency, edged higher.

The latest gold rally came as fresh buyers were attracted to the market, analysts said.

Macro hedge funds were noted buyers and may also have dominated demand during yesterday's Comex sweeps, which accounted for much of the price action, said UBS in a note.

Generally, these players have been on the sidelines in recent months, waiting for a better opportunity to buy; with a proper correction failing to materialize, their patience has probably run out. If participation from the macro hedge fund community has only just started to accelerate, this adds a new dynamic to the gold market.

The world's largest gold-backed exchange-traded fund, New York's SPDR Gold Trust, said on Thursday its holdings rose by nearly 15 tonnes from the day before.

Other precious metals also broadly benefited from gold's rise, with platinum rising to its highest since early May, up 2 percent at $1,873.99 an ounce, and silver climbing 1.8 percent to $41.30.

Some investors are still buying platinum on the back of a gold:platinum ratio near 1, analysts said, although this trade made less sense now than in previous years as platinum, an industrial metal, faces a soft demand picture.

With the economic outlook deteriorating we would not be surprised to see downward pressure on prices emerge, said ScotiaMocatta in a monthly report.

Palladium meanwhile bucked the trend for gains, remaining flat at $751.47 an ounce.