Japan posted a goods trade surplus of ¥3.41 billion ($32.1 million) in February amid continued strength in exports, but rising energy imports weighed on the black ink, government data showed Monday.

The trade surplus came as exports rose 1.8 percent from a year earlier to ¥6.463 trillion, up for the 15th straight month, while imports soared 16.5 percent to ¥6.460 trillion. Japan has benefited from strengthening overseas demand as global economic growth has gained traction.

But the surplus shrank 99.6 percent in February due largely to the impact of China's Lunar New Year holidays that began in mid-February — later than those a year ago. Exports to China tend to decrease while imports often gain around the holidays.