* Gaza fighting pushes oil up $2 a barrel
* Gold gains 1.7 percent
* European shares lifted by energy stocks
By Jeremy Gaunt, European Investment Correspondent
LONDON, Dec 29 (Reuters) - Oil and gold prices surged on Monday following a flare up in Middle East violence, while an ensuing rally in resources-related stocks helped equities post solid gains.
On currency markets, Britain's pound hit another record low against the euro and the Swiss franc gained on safe-haven plays. The dollar was broadly weaker.
Investors headed towards year-end with a new risk factor, this time in the Middle East, to add to the worst financial crisis in decades and a global recession.
Israeli warplanes pounded the Hamas-ruled Gaza Strip for a third consecutive day on Monday as the Jewish state prepared to launch a possible invasion.
More than 300 Palestinians have been killed in what Israelis said was a response to almost daily rocket and mortar fire from Gaza after the Islamist Hamas group ended a six-month ceasefire a week ago.
Oil prices rose $2 a barrel to more than $39 a barrel.
Oil markets are ending a manic year in which crude surged to a record at close to $150 a barrel in July before crashing down amid fears about a sharp slowdown in the global economy.
Gold prices extended last week's rally to gain around 1.7 percent to $881 an ounce.
"It's a terrible situation and it just seems to be again causing major concerns for all the markets," Peter McGuire, managing director at Commodity Warrants Australia, said of the Gaza violence.
"But where it's going, nobody knows. Who can speculate on war?" he said.
SHARES ADVANCE
European shares rose, led by energy and metals stocks.
The FTSEurofirst 300 index of top European shares was up 1.1 percent after closing 0.5 percent lower in the previous trading session. The benchmark has lost 46 percent so far this year.
BP, Royal Dutch Shell, gas producer BG Group and Tullow Oil added between 3.2 and 4.8 percent.
"The trading over the Christmas period has been somewhat disappointing and therefore in the short term, the reality is that that markets are going to remain volatile and continue to be under pressure," said Henk Potts, equity strategist at Barclays Stockbrokers.
Earlier in Japan, the Nikkei average ended up 0.1 percent, helped by news that three non-life insurers including Mitsui Sumitomo Insurance Group Holdings were in talks to merge.
The dollar fell broadly, hobbled by a grim outlook for the U.S. economy and the Federal Reserve pouring liquidity into the banking system.
The euro rose 1.4 percent to $1.4253 and was up 1.2 percent against the pound at 0.97 pence, an all time low.
On euro zone government bond markets, the interest rate-sensitive two-year Schatz yield was down 2 basis points at 1.783 percent. (Editing by Mike Peacock)