Japan's exports climbed 2.4 percent in May on year, missing economist forecasts but underscoring a gradual recovery in external demand.
Economists polled by Reuters predicted a 3.5 percent rise in exports.
Imports fell an annual 8.7 percent versus expectations for a 7.5 percent decline forecast in a Reuters poll, while the trade balance stood at a deficit of 216 billion yen, smaller than predictions for a 226 billion yen deficit.
Shortly after the data, the yen moved up very slightly against the dollar to 123.43.
Marcel Thieliant, Japan economist at Capital Economics, said that the trade deficit was likely to creep higher in the second half of the year as the weaker yen pushed up import costs.
"Looking ahead, the decline in natural gas import prices, which follow crude oil prices with a lag of around six months, should soon have run its course," he wrote in a note immediately after the data was released.
"Meanwhile, the exchange rate has started to weaken again against the dollar, which should lift the cost of imports by more than it raises the yen-value of exports."
"We expect the yen to weaken further towards 130 against the dollar by the end of this year, and to 140 by the end of next. The upshot is that the trade deficit should start to creep higher in the second half of the year," he added.
The trend of rising exports and falling imports continued from April, when exports rose 8.0 percent from a year earlier and imports declined 4.2 percent.
The data comes a day before the Bank of Japan's two-day monetary policy meeting. The central bank is widely expected to stand pat on monetary policy following BOJ Governor Haruhiko Kuroda's recent comments that the yen was already very weak and was unlikely to weaken further.
Exports are moderating at a delicate time for Japan. The world's third-largest economy outshone the U.S. and Europe in the January-March quarter by growing an annualized 3.9 percent, partly on accelerated business investment, but data released so far for the second quarter is less impressive, particularly consumer spending.
The trade figures showed that exports to China were up 1.1 percent year-on-year, while exports to the US grew 7.4 percent.
Export volumes, which economists consider a more reliable measure of Japan's export strength than the overall value, declined 3.8 percent, the first drop in three months.
Peter Boardman, managing director at Tradewinds, told CNBC that weaker demand in China could be a concern for Japan, and that the trade performance may hit industrial output.
"Japan was growing up inventories on expectations of the weaker yen, and expectations of increase of exports to North America and China and Europe," he said.
"And with the weaker yen not translating to higher exports it means that the industrial production could slow down for the rest of the month."