Japan posted a customs-cleared trade deficit of 348.9 billion yen in January, the first monthly deficit in five years and the largest in 23 years, the Finance Ministry said Thursday.

The deficit -- the biggest since 409.8 billion yen was logged in January 1983 -- stemmed from higher oil prices, which inflated the value of imports, and shrinking exports by domestic manufacturers during the New Year holidays, ministry officials and economists said.

The latest figure compared with a 193.9 billion yen surplus the prior year, the ministry said in a preliminary report.