* Gold rallies to one-month high as stock loss deepens
* Oil surges near $143 a barrel, lifetime record
* Dollar holds near three-week low against euro (Recasts, updates with quotes, closing prices, market activity, adds NEW YORK to dateline)
By Frank Tang and Raissa Kasolowsky
NEW YORK/LONDON, June 27 (Reuters) - Gold ended near a one-month high on Friday as record oil prices stirred inflation fears and wreaked havoc on global stock markets, prompting investors to pour funds into bullion.
Gold <XAU=> climbed to $930.40 an ounce, its highest since May 27, and was at $927.20/928.20 by New York's last quote at 2:15 p.m. EDT (1815 GMT), well above the $912.60/913.60 an ounce it was quoted late in New York on Thursday.
"It's holding quite well near the highs, closely following crude oil and euro-dollar," said UBS analyst John Reade.
"It certainly seems that with the oil prices very strong, the dollar fairly weak and obviously lots of risk aversion around that, gold can do quite well."
The U.S. gold contract for August delivery <GCQ8> on COMEX division of New York Mercantile Exchange settled up $16.20, or 1.8 percent, at $931.30 an ounce.
On Thursday, the contract's 3.7 percent rally was the biggest one-day increase for a COMEX gold contract on a front-month delivery basis since June 2006.
Rising energy prices boost gold's appeal as a hedge against inflation, while a weaker dollar makes the metal an attractive alternative investment.
Despite the gains, gold was still below a lifetime high of $1,030.80 an ounce hit in March.
Reade said the charts indicated that gold could rise further in the short term.
"If we hold and close at these levels this will prompt some more buying next week. The reason for that is that we're quite comfortably above the 100-day moving average (of prices) now, which comes in at about $916," he said.
Adam Hewison, president of MarketClubs.com, said that gold could rise further based on chart-based support as bullion accelerated amid buying signals after it surpassed $900 an ounce on Thursday.
Hewison said that gold could gain further strength and possibly test $1,000 an ounce if it rallied above $935.30, a closely watched level among technical analysts.
Oil leapt to a new record high $142.99 a barrel on Friday, extending gains after surging nearly 4 percent in the previous session. U.S. crude futures <CLc1> ended up 57 cents at $140.21 a barrel.
The dollar traded close to multiweek lows versus the euro and the yen as investors reduced risk exposure amid record high oil prices and fears about U.S growth.
The U.S. currency came under pressure after the U.S. Federal Reserve's statement earlier this week scaled down expectations of further interest rate hikes.
"After the Fed came in and talked about its inflation concerns the market now sees the possibility of rate rises as relatively low and that is really starting to pull on the gold price which is particularly sensitive to FX and global rates," said Daniel Hynes, metals strategist at Merril Lynch.
In industry news, the market also kept an eye on the supply side threats. In Peru, miners are going ahead with a plan to strike for better benefits starting on Monday. [
]Spot platinum <XPT=> ended at $2,052.00/2,072.00 an ounce from $2,057.50/2,077.50 late in New York on Thursday. Spot palladium <XPD=> ended slightly higher at $465.00/473.00 an ounce from its previous finish of $464.00/472.00 an ounce.
Silver <XAG=> edged up to $17.48/17.56 an ounce from $17.22/17.28 late in the U.S. market on Thursday.