The yen rose to a seven-week high against the dollar on Wednesday, as investors bought the Japanese currency for safety, spooked by plunging Chinese stocks and the still unresolved Greek debt crisis.
The low-yielding yen, used as a funding currency to buy other higher-yielding assets in so-called "carry trades," typically rallies in times of economic and financial stress as investors unwind these transactions.
In recent months, however, investors have also used the euro as a funding currency because of its low interest rates, and on Wednesday, the euro-funded carry trades were being unwound.
In unwinding the carry trades, traders repay loans taken out in euros and yen that were used to make bets on assets offering higher yields. An unwinding results in inflows in the funding currencies.
"Greece and China have been at the forefront of investors' minds right now, although China is the bigger factor simply because of its size and its role as a global market player," said Ninh Chung, head of investment strategy and portfolio management at SVB Asset Management in San Francisco.
Greece on Wednesday formally applied for a three-year loan from the European Union.
Chinese stocks, meanwhile, fell again on Wednesday after the securities regulator warned that investors were in the grip of "panic sentiment", as the market showed signs of freezing up as firms scrambled to escape the rout by having their shares suspended.
The dollar fell to its lowest since May 19 at 120.46 yen. It was last at 120.70 yen, down 1.48 percent. The euro also dropped against the yen, down 0.92 percent at 133.38 yen, after earlier sliding to a six-week low.
Against the dollar, the euro was up 0.6 percent at $1.1075.
Meanwhile, the Federal Reserve on Wednesday released the minutes of the last monetary policy meeting in June. The Fed, in the minutes, said it needed to see more signs of a strengthening U.S. economy before raising interest rates. It also cited Greece's debt crisis as a serious concern.
The currency market, however, showed little reaction to the minutes.
"The minutes were somewhat less important to markets than normal, given the heightened level of more immediate concern regarding Greece and China," said Omer Esiner, chief market analyst at Commonwealth Foreign Exchange in Washington.
The dollar was 0.64 percent lower against a basket of currencies at 96.23.