Japan’s factory output unexpectedly declined for the first time in three months in April amid a global slowdown, in a weak start to the country’s second quarter.

Industrial production fell 0.4% from the previous month after two consecutive months of increases, according to industry ministry data released Wednesday. Economists had forecast a 1.4% rise. Factory machinery, metal products and automakers’ output dragged on the overall figures.

The latest results likely reflected impact from the global slowdown, overshadowing the positive effects from improving supply chains. The weakness in domestic production is a potential drag for the Japanese economy, which has recently shown some signs of recovery, especially in the first quarter.

"It was unexpectedly weak,” said Kota Suzuki, an economist at Daiwa Securities. "The output for production machinery, electronic components and devices were considerably lower than forecast. It reflects weakness in global demand for goods, particularly in the U.S. and Europe. China is not doing so well either.”

A separate industry ministry report showed that retail sales also fell for the first time in five months in April from the previous month, contrary to earlier data that indicated an upbeat consumption trend. It still remains far above year earlier levels.

"A surprise drop in Japan’s April industrial production marks a weak start to the second quarter and raises the risk that the bounce in (gross domestic product) in the first quarter of 2023 could lose some vigor in the second quarter," said Taro Kimura, economist at Bloomberg Economics. "But we’re not too pessimistic — the pullback was mostly driven by volatile and expensive products such as chip-making machines and aircraft parts.”

In addition to fears about the global deceleration, there are several risks looming over the Japanese economy. The U.S. economic and financial situation remains a source of concern.

"The main scenario is a natural global slowdown” going ahead, said Suzuki. "It’s inevitable given that the effect of rate hikes will hit this year with a lag.”

China’s economy also doesn’t appear as strong as initially expected. Japan’s exports to its neighboring country have been falling for five months, indicating China’s recovery is losing momentum after an initial burst in consumer and business activity earlier in the year.

The banking turmoil in the U.S. and Europe, including the collapse of Silicon Valley Bank, has entered a lull for now, but it also remains unclear whether it has been completely contained or whether it could flare up again.

Washington is likely to avoid a default, as U.S. President Joe Biden and House Speaker Kevin McCarthy reached a tentative debt-ceiling deal last weekend. However, this has already caused disruption and confusion in the global markets, and traders remain somewhat cautious about the agreement.