NEW YORK (Reuters) - Investors rushed into safe-haven assets on Friday after U.S. air strikes in Iraq killed a senior Iranian military official, sending the Japanese yen to a three-month high, while the U.S. dollar index was knocked by the weakest domestic factory activity in a decade.

A Japan Yen note is seen in this illustration photo taken June 1, 2017. REUTERS/Thomas White/Illustration

In addition to the yen, U.S. Treasuries, German bunds and gold rallied after the overnight air strike in Baghdad killed Qassem Soleimani, Tehran’s most prominent military commander and the architect of its growing military influence in the Middle East.

“Overall, geopolitical risk premia have risen substantially overnight,” said Karl Schamotta, chief market strategist at Cambridge Global Payments. Investors were “really looking for safe havens and a port in the storm,” he added.

The Japanese yen JPY= had risen as high as 107.82 per dollar and was last up 0.48% on the day at 108.04. The yen is often seen as a haven from risk, given Japan's status as the world's largest creditor nation. A holiday in Tokyo also made for thin conditions, exaggerating the move.

The U.S. dollar index .DXY initially benefited from the move into safe-haven assets, but those gains were erased after the Institute for Supply Management (ISM) reported that the manufacturing sector contracted significantly in December. It was last up 0.03% on the day at 96.873.

The attack sparked concerns about crude supply disruptions, lifting oil prices more than $3. Petrocurrencies gained slightly on the higher crude prices, but those were then largely offset by the overall move away from risk, said Schamotta.

The U.S. manufacturing sector contracted in December by the most in more than a decade, with order volumes crashing to a near 11-year low and factory employment falling for a fifth straight month, according to a report from ISM released on Friday.

“That is a depressing number,” said Schamotta.

It suggests “trade war-related uncertainty has actually damaged the manufacturing sector on a sustained basis and that points to weakness in GDP, particularly in the coming quarter because what you’re likely to see is an inventory drawdown as opposed to continued build.”

The longer-term effects on the dollar are unclear. Though it weakened Friday, the greenback may ultimately benefit if slower U.S. manufacturing dents hopes for global growth in 2020.

“The idea that other countries that are large exporters to the U.S. might see a large rebound in the near term - that idea is losing traction here,” said Schamotta.