The yen edged higher against the dollar on Monday, as investors trimmed their exposure to riskier assets after North Korea conducted its most powerful nuclear test.

The dollar fell to as low as 109.22 yen JPY= in early Asian trade and last fetched 109.81 yen, down 0.4 percent from late U.S. trade on Friday.

The heightened risk aversion followed news on Sunday of North Korea’s sixth and most powerful nuclear test, prompting the warning of a “massive” military response from the United States if it or its allies were threatened.

The yen almost always gains when investors try to reduce exposure to risk because the currency is often used as a funding source to buy riskier, higher-yielding assets.

Japan is also the world’s largest net creditor nation, and at times of uncertainty traders assume Japanese repatriation from foreign countries will outweigh foreign investors’ selling of Japanese assets. Curiously, the yen has continued to behave as a safe-haven currency despite Japan’s proximity to North Korea.

The yen’s rise came as investors sold riskier assets, with the MSCI’s broadest index of Asia-Pacific shares outside Japan slipping 0.4 percent .MIAPJ0000PUS. On Friday, the MSCI gauge of Asian equities scaled its highest intraday levels since December 2007.

The fact the yen has pared its gains after pushing higher initially suggests that market participants are not expecting any prolonged market turmoil following North Korea’s latest nuclear test, said Steven Dooley, currency strategist for Western Union Business Solutions in Melbourne.

“Typically that is how it has played out previously. They increased their rhetoric, increased their belligerence in order to gain negotiating advantage,” Dooley said.

“You would expect to see a sharper move to the downside if markets were assuming that this was going to lead to…military conflict,” he said, referring to moves in the dollar versus the yen.

Following the latest nuclear test, which Pyongyang said was a hydrogen bomb, U.S. President Donald Trump refused to rule out military action and threatened to cut off trade with any country doing business with the reclusive state.

U.S. Defense Secretary James Mattis said Trump asked to be briefed on all available military options.

The euro fell 0.3 percent against the yen to 130.47 yen EURJPY=R, having slipped to as low as 129.65 yen in early Asian trade on Monday.

Against the dollar, the euro rose 0.2 percent to $1.1882 EUR=, staying below a 2-1/2-year high of $1.2070 set last week.

U.S. ECONOMY

Doubts about the possibility of the U.S. Federal Reserve raising interest rates again this year could temper any near-term bounce in the dollar against the yen, said Masashi Murata, currency strategist for Brown Brothers Harriman in Tokyo.

“A (dollar) rise toward the 112 yen to 115 yen levels seems unlikely,” Murata said, adding that a focus for the dollar this week will be comments from Fed officials including Fed Governor Lael Brainard.

Data on Friday showing that U.S. job growth slowed more than expected in August did little to alter market expectations that the Fed will probably wait until around the middle of next year before raising interest rates again.

Subdued U.S. wage growth and inflation have reinforced market expectations that the pace of the Fed’s monetary tightening will be gradual, and weighed on the greenback in recent months.