TOKYO--Japan reported its first monthly trade surplus in nearly three years Wednesday, as falling oil prices reduced the value of imports while a weaker yen and the U.S. economic recovery lifted outbound shipments.

The monthly trade balance came to a surplus of Y229.3 billion. The market was expecting a surplus of Y47.9 billion, according to a survey conducted by The Wall Street Journal and the Nikkei.

Exports grew 8.5% on year, while imports fell for the third straight month, sliding 14.5%, the Ministry of Finance said.

The slump in global oil prices was the largest single factor pushing the trade balance into a surplus. The value of crude oil imports fell 51% from a year earlier, reflecting the halving of global oil prices over the past year.

While the weaker yen has inflated the value of Japan's shipments abroad, the data showed that the overall volume of exports also increased by 3.3%. Exports to the U.S. were particularly strong, surging 21% on the back of strong demand for automobiles.

A recovery in the world's largest economy and growth of middle class population in China has been boosting demand for Japanese products.

But many economists question whether the trade balance will continue to improve. For one, there's no guarantee that crude oil prices will remain low. For another, overseas economies may slow down again.

Write to Mitsuru Obe at mitsuru.obe@wsj.com

Subscribe to WSJ: http://online.wsj.com?mod=djnwires