NEW YORK (Reuters) - The yen surged to its highest in more than three years against the euro on Tuesday as chances of Britain voting next week to leave the European Union grew, prompting a flight to safe havens such as the Japanese currency.

South Korean won, Chinese yuan and Japanese yen notes are seen on U.S. 100 dollar notes in this file photo illustration shot December 15, 2015. REUTERS/Kim Hong-Ji//Illustration/Files

The yen also hit a six-week high versus the dollar and a nearly three-year peak against sterling.

The dollar though trimmed its losses against the yen after a strong U.S. retail sales report for May, although the data did little to increase the odds of an interest rate hike by the Federal Reserve in the summer.

The U.S. data’s impact was muted, with the market generally preoccupied by Britain’s future in the EU.

As opinion polls continued to show the "Leave" camp moving ahead before the June 23 vote, and Britain's biggest selling paper, the Sun, came out in favor of leaving the bloc, sterling fell to a more than two-month low of $1.4093 GBP=.

“The rising tide of volatility has lifted all boats, making hedging sterling risks via proxy currencies or surrogates very, very expensive,” said Shaun Osborne, chief currency strategist ScotiaBank in Toronto.

“Our option desk notes that liquidity is poor in short-dated sterling options and non-existent in dates around the referendum. For investors who still want or need cover, a spot position - short sterling or euro versus the dollar or yen - still makes sense and perhaps offers the most practical hedge now.”

The Swiss franc, another traditional harbor in times of global financial stress, hit a three-month high against the euro EURCHF=, and the dollar gained against the euro EUR= and a basket of currencies .DXY.

In late trading, the euro was down 1.0 percent against the yen at 118.84 EURJPY=, while the dollar slid 0.2 percent to 106.05 yen JPY=.

Ahead of this week’s Bank of Japan meeting, traders said strong resistance around 105.50 has kept the yen from surging to 100 per dollar, the level many assume would force Japan to intervene against its currency.

The debate now among traders is whether the BoJ will take policy steps on Thursday aimed at weakening the currency, when a vote for a Brexit next week would be expected to drive more yen buying as a safe haven.

The dollar got back above 106 yen after data showed U.S. retail sales increased 0.5 percent last month following an unrevised 1.3 percent surge in April.

The Fed concludes its policy meeting on Wednesday, with investors expecting interest rates to hold steady.