NEW YORK (Reuters) - The dollar hit an eight-week low against the Japanese yen on Thursday, as the escalating tensions between the United States and North Korea drove investors to seek safety in assets viewed as less risky.

FILE PHOTO: U.S. Dollar and Euro notes are seen in this June 22, 2017 illustration photo. REUTERS/Thomas White/Illustration/File Photo

The dollar was down 0.77 percent against the yen JPY= at 109.21 yen. The Japanese currency rallied broadly against most major currencies.

“The yen is the big story really. Risk aversion is still very much a concern for markets,” said Shaun Osborne, chief currency strategist at Scotiabank in Toronto.

The Swiss franc CHF= and the yen notched big gains against the dollar on Wednesday after U.S. President Donald Trump warned North Korea that it would face "fire and fury" if it threatened the United States.

Trump ratcheted up his rhetoric toward North Korea on Thursday, saying it should be “very, very nervous” if it even thinks about attacking the United States or its allies, after Pyongyang said it was making plans to fire missiles over Japan to land near the U.S. Pacific territory of Guam.

The yen is often sought in times of geopolitical tension, partly because Japan has a big current account surplus.

“It’s surprising that given Japan’s proximity to North Korea the yen is seeing any benefit from risk aversion,” said Lennon Sweeting, chief market strategist for XE.com, in Toronto.

Weakness in U.S. Treasury yields may also be supporting the yen, Sweeting said. [nL1N1KW1CT]

News that U.S. producer prices unexpectedly fell in July earlier helped send the dollar lower.

On Thursday, New York Federal Reserve President William Dudley said he expects sluggish U.S. inflation to rise over the next several months while the hot labor market gets even hotter. Dudley’s comments reinforced the Fed’s gradual policy-tightening plan.

Investor focus now turns to Friday’s U.S. consumer price index data.

“After today’s data and commentary from Dudley, if we see even a near-miss on CPI tomorrow, I think the dollar has got quite a bit of room to sell off,” Sweeting said.

The dollar index .DXY, which tracks the greenback against six rival currencies, was down 0.17 percent to 93.391.

The euro was 0.14 percent higher against the dollar. The kiwi was 0.79 percent lower against the greenback after New Zealand’s central bank said it was slightly more uncomfortable with the high level of the local dollar than it had been in May.]

Sterling touched a three-week low against the dollar as a mixed bag of output and trade data did little to alter investors’ downbeat view of an economy struggling to meet Bank of England targets.