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.