* Yen gains on rising risk aversion
* Weak U.S. jobs data sours outlook on U.S., global growth
* July 8-10 G8 meeting eyed for FX diversification debate
* Dollar gives up earlier gains vs euro as stocks edge up
* U.S. services sector shrinks at slower pace (Updates prices, adds detail)
By Steven C. Johnson
NEW YORK, July 6 (Reuters) - The yen gained broadly on Monday as investors nervous about the global economic outlook shunned risk and took shelter in currencies perceived to be safest in times of subpar growth.
The dollar hit a five-week low against the yen as fallout from last week's grim U.S. jobs data unnerved investors who had bet on an improving world economy. The greenback briefly hit a two-week high against the euro but gave up gains as the Dow and S&P 500 staged a late return to positive territory.
When risk aversion rises, investors cut holdings of stocks and higher-yielding currencies and often buy back yen and U.S. dollars that were used to finance the trades.
The market mood, though, remained cautious.
"Belief was building that we would see a straight-line recovery, but a lot of that optimism is coming out of the market in a big way today," said Mark Frey, head trader at Custom House, a currency services firm in Victoria, British Columbia.
"So it's a classic risk-aversion move, with global equities coming off and commodities down, causing commodity currencies to take it on the chin while boosting the dollar and yen."
The dollar was down 0.8 percent at 95.30 yen after hitting a five-week low of 94.66 yen. The euro hit two-week lows against the dollar and yen. It was last down 0.6 percent at 133.16 yen but wiped out earlier losses to trade up 0.1 percent against the greenback at $1.3973.
Sterling fell 0.4 percent to $1.6270 and 0.9 percent to 155 yen.
G8 SUMMIT ON HORIZON
Data showing the U.S. service sector shrank at a slower pace in June failed to stop the overall move away from risk, and analysts said traders were coming to terms with seeing recent economic data undershoot expectations.
Just before last week's long U.S. holiday weekend, data showed U.S. employers cut 467,000 jobs in June, more than economists had expected, while the jobless rate rose to 9.5 percent.
Andrew Wilkinson, analyst at Greenwich, Connecticut-based Interactive Brokers Group, called it "a wake-up call for those dreaming about a global recovery and a return to business as usual."
One potential hurdle for the dollar could come later this week if a G8 meeting in Italy features discussion about diminishing the dollar's role as the world reserve currency.
Though any diversification of central bank reserves away from the dollar would take many years to materialize, investors are on alert after several Chinese officials said the world should look to displace the U.S. currency.
The dollar received some support, however, when China's vice foreign minister said over the weekend the U.S. currency would remain dominant for "many years to come."
China is the world's biggest holder of U.S. Treasury debt and has some $1.95 trillion in foreign exchange reserves, with some 70 percent or so thought to be held in dollars. (Additional reporting by Nick Olivari; Editing by Leslie Adler)