The U.S. dollar briefly jumped above the 140 yen line Wednesday as news of a missile striking Poland raised concerns over geopolitical risks, though gains were pared following a comment by U.S. President Joe Biden that it was unlikely the missile was fired from Russia.

The dollar rose more than 2 yen at one point in Tokyo from its levels in New York the day before, following reports that a missile landed in Poland and killed two people.

"Investors bought the dollar, which is usually hoarded during emergency situations," said Sho Suzuki, a market analyst at Matsui Securities Co.

The U.S. currency later fell back below the 140 yen line after Biden said it is "unlikely" that the missile which landed in Poland was fired from Russia. The Polish government said earlier that the missile was Russian-made.

At 5 p.m., the dollar fetched 139.37-39 yen compared with 139.26-36 yen in New York and 139.33-35 yen in Tokyo at 5 p.m. Tuesday.

The euro was quoted at $1.0402-0404 and 144.98-145.02 yen against $1.0345-0355 and 143.95-144.05 yen in New York, and $1.0407-0408 and 145.01-05 yen in Tokyo late Tuesday afternoon.

The surge on Wednesday came after the greenback dropped to a two-and-a-half month low of 137.67 yen overnight in New York as a smaller-than-expected rise in the U.S. producer price index in October added to expectations that the Federal Reserve will slow the pace of interest rate hikes.

Still, Suzuki said that the dollar is likely to test the upside toward 145 yen for the rest of the year.

Tokyo stocks ended mixed as earlier losses on the news of the missile were eroded by Biden's remarks.

The 225-issue Nikkei Stock Average ended up 38.13 points, or 0.14 percent, from Tuesday at 28,028.30. The broader Topix index finished 0.93 points, or 0.05 percent, lower at 1,963.29.

On the top-tier Prime Market, gainers were led by mining, wholesale trade, and information and technology issues, while insurance, precision instrument, and rubber product issues were among major decliners.

The stock market was under pressure during the morning, with the Nikkei index extending losses to more than 240 points at one point after the missile news. But shares were bought back after Biden's remarks.

"Tensions caused by concerns that NATO may get involved in a military conflict with Russia receded following Biden's comment," said Masahiro Ichikawa, chief market strategist at Sumitomo Mitsui DS Asset Management Co., referring to the North Atlantic Treaty Organization. NATO top officials held an emergency meeting with the leaders of the Group of Seven states earlier Wednesday.

Among Prime Market issues, advancing issues outnumbered decliners 940 to 821, while 75 ended unchanged.

Technology issues tracked gains on the Nasdaq index overnight. Chip-manufacturing equipment maker Tokyo Electron rose gained 750 yen, or 1.6 percent, to 46,400 yen, while chipmaker Screen Holdings was up 110 yen, or 1.2 percent, to 9,230 yen.

Trading volume on the Prime Market rose to 1,225.49 million shares from Tuesday's 1,211.30 million.

The yield on the bellwether 10-year Japanese government bond was unchanged from Tuesday's close at 0.240 percent. Investors earlier bought the safe-haven debt on news of the missile being fired. Bond yields move inversely to prices.

Related coverage:

G-7, NATO affirm cooperation after missile hits Poland amid Russia war

Japan spent record 2.83 tril. yen on Sept. 22 to stop yen's fall

FOCUS: Yen, inflation at levels unseen in decades not likely to sway BOJ