The yen surged on Thursday, taking some of the wind out of the sails of the recently buoyant dollar and leaving investors scrambling to cover positions.

The dollar earlier had stuck close to its recent ranges, as investors looked ahead to a speech by Federal Reserve chief Janet Yellen on whether a rate increase is imminent and on a pending decision on a planned sales tax hike in Japan.

Then a sudden spike in the yen in relatively illiquid conditions triggered stop-loss orders and brought the Japanese currency as low as 109.42 from a session high of 110.235. It was last at 109.55.

"The sudden move shows how jumpy everyone is," said a trader at a foreign bank in Tokyo.

Some traders mentioned an interview with Masatsugu Asakawa, Japan's vice minister of finance for international affairs, who told the Financial Times that direct currency intervention will remain in the ministry's toolbox.

Other traders, who did not see any fresh trading catalysts, said they were forced to buy back the Japanese currency.

The euro slipped 0.4 percent to 122.45 yen, while the Australian dollar slid 0.7 percent to 78.75 yen.

While Japanese officials have publicly railed against the yen's rapid appreciation to 18-month highs earlier this month, some economic policymakers have told Reuters they are not so worried that the yen will derail efforts to revive exports and the economy.

In addition to talk of currency intervention, investors have been eager for any developments about the timing of Japan's sales tax increase.

Japanese Finance Minister Taro Aso said on Wednesday that he told his G7 counterparts at a finance leaders' meeting last week that Japan will raise the tax as planned. But he did not say whether that meant Japan has officially pledged to the international community that it will go ahead with the increase.

Japan's top government spokesman on Wednesday denied a newspaper report that Prime Minister Shinzo Abe is likely to delay the sales tax hike now scheduled for next year.

"You have conflicting opinions coming out of the same government, and I think that's creating some noise in the market," said Jennifer Vail, head of fixed-income research at U.S. Bank Wealth Management in Portland, Oregon.

"Anytime you have conflicting major players in the market place, it creates confusion, and I think the yen will likely struggle without clarity on whether they're going to delay the sales tax hike," she said.

Markets were also keeping an eye on the Group of Seven leaders summit meeting in Japan. Concerns about the health of the global economy are likely to be a key topic among the participants, although full agreement on macroeconomic policy looks elusive.

Fed Chair Yellen is due to speak on Friday, and could reinforce expectations that the central bank might raise interest rates as early as next month, or July. Hawkish minutes from the Fed's April policy meeting and comments by several policymakers hinted that a hike could be forthcoming.

The dollar index inched down 0.1 percent to 95.235, moving away from a two-month high of 95.661 notched in the previous session.

The euro added 0.1 percent to $1.1170, after skidding to a roughly 10-week low of $1.1129 on Wednesday.

Underpinning the single currency, Eurogroup ministers gave Greece its firmest offer yet of debt relief, approving the release of 10.3 billion euros ($11.48 billion) in recognition of painful fiscal reforms pushed through by Prime Minister Alexis Tsipras' leftist-led coalition.