Japan's customs-cleared trade surplus shrank 68.3 percent in May from a year earlier to 297.0 billion yen for the second monthly decline in a row, as record high oil prices inflated the value of imports while exports to China slowed, the Finance Ministry said Wednesday.

Overall exports grew 1.4 percent to 4.796 trillion yen, up for an 18th month, while imports rose 18.6 percent to 4.499 trillion yen, up for 15 months in a row, the ministry said in a preliminary report.

Both exports and imports posted the highest levels on record for May, it said, underscoring Japan's robust trade with the rest of Asia and other parts of the world.