The yen surged to its highest level against the dollar in more than two years on Wednesday as investors pared back exposure to risky trades on worries about credit market losses and the health of the U.S. economy.

The dollar also hit a record low against the euro for the second straight day.

The U.S. currency fell below 109 yen for the first time since June 2005 as global stocks weakened and oil prices pushed toward $100 a barrel.

The low-yielding Japanese currency tends to do well in times of risk aversion because investors unwind carry trades that use cheaply borrowed yen to buy higher-yielding currencies.

Meanwhile, the high-yielding Australian dollar fell 2.3 percent against the greenback, while sterling hit a four-and-a-half-year low against the euro.

Risk aversion is dominating the FX market and the trend was set overnight with the fall in global equities, said Matthew Strauss, senior currency strategist at RBC Capital Markets in Toronto.

Increased concerns about the credit market are not only focused on the U.S., but also globally. That supported the unwinding of carry trades, boosting the yen, he added.

The dollar fell as low as 108.27 yen and last traded at 108.65 yen, down 1.2 percent. The euro was 1.0 percent weaker at 161.34 yen. Against the Swiss franc, the dollar hit an all-time low for a second straight session, dipping to 1.1025 francs.

The euro hit a record high of $1.4856 before easing to $1.4844, up 0.2 percent from late Tuesday. The dollar index, which measures the greenback against a basket of six currencies, also sank to a record low overnight but pared losses by mid-afternoon in New York.

The demand for safer assets and light volume puts euro-dollar at $1.50 in the crosshairs, said Boris Schlossberg, senior currency strategist at in New York. The euro has gained more than 6 percent on the dollar since the Federal Reserve began cutting rates in mid-September.

The Fed has cut rates by 75 basis points so far this year, and futures markets have fully priced in another quarter-point easing at the U.S. central bank's next policy meeting next month.

A weak dollar also helped push U.S. light crude to a record $99.29 per barrel earlier in the day, before it retreated mid-afternoon.

Risk appetites began to weaken on Tuesday after the second-largest U.S. mortgage finance company, Freddie Mac, reported a record loss, prompting fears it would be unable to provide liquidity to an already struggling home loan market.

For now it looks like the carry trade can be put on ice as the dangers from the housing inventory overhang spillover into the subprime space, said Andrew Wilkinson, senior analyst at Interactive Brokers Group in Greenwich, Connecticut.

The order of the day is risk reduction and that's sending chills up the spines of those who up to now have been used to seeing the yen play the whipping boy each day, he added.

Analysts said further sharp currency moves are likely in the near term, with U.S. trading desks shuttered on Thursday for the Thanksgiving holiday and likely to be thinly staffed on Friday.

A Wednesday report showing U.S. consumer sentiment hit a two-year low in November had little immediate impact but added to the sense of longer-term gloom.

Analysts said consumer data due next month is more important, as it will follow the start of the U.S. holiday shopping season and tell how big a bite high gasoline prices and the housing slump are taking out of consumers' wallets.