Japan's factory output posted the biggest monthly drop in two years in May as China's COVID-19 lockdowns and semiconductor and other parts shortages hit manufacturers, adding more pressure on an economy struggling to mount a strong recovery.

The decline also highlights the challenge the world's third-largest economy faces in overcoming supply disruptions and persistently high prices of raw materials and energy that analysts say could weaken global demand.

Factory output slumped a seasonally adjusted 7.2% in May from the previous month, official data showed on Thursday, as production of items such as cars as well as electrical and general-purpose machinery dropped sharply.