Japan's annual trade surplus grew by 7.3% in July, official figures showed, as brisk exports to Asia offset sluggish demand in the United States.
The Nikkei fell on news of the trade surplus
Overall, exports recovered enough to slightly outstrip the growth in imports, boosting hopes of a recovery in the world's second largest economy.
But the 799.2bn yen (£4.32bn; $6.8bn) surplus figure was smaller than expected by many economists.
And the markets gave a muted reaction to the news, with the recent strength of the yen against the dollar continuing to take its toll on exporters.
The Nikkei average finished down 0.04% or 4.53 points at 10,276.64,, while the yen strengthened against the US dollar.
Japanese exports grew 5.6% in July, recovering from June's marginal 0.04% slip, the first fall in 15 months.
July's growth in exports outpaced the 5.3% increase in imports during the month.
But some analysts say the rise in exports is likely to be temporary.
The growth in Japan's trade surplus in July follows a sharp 30.8% contraction in June. In May, the surplus was up 12.5%.
Japan's surplus with the US shrunk by 6.2% in July from the same month a year ago to 570.10bn yen, marking the seventh consecutive month of decline.
Exports to the United States were down 7.3%, while imports fell 8.4%.
The drop was mainly due to a slump in shipments of Japanese cars, auto parts, computers and motorcycles.
"Auto exports, which have long been the locomotive of Japanese economic growth, appear stagnant recently amid concerns that demand for Japanese cars there has hit a ceiling," said Tatsuya Torikoshi, an analyst at the Daiwa Research Institute.
Japan's trade with Asia recovered with the surplus growing 16.7% to 464.75bn yen.
The increase was down to a 12.7% rise in exports and an 11.6% increase in imports.
Analyst Hideki Matsumura, of the Japan Research Institute, said: "It is too early to tell whether the July gain was a sign of firm recovery in the nation's exports.
"We still have uncertain factors, including the fate of the US economy, which have a big impact on the Japanese and Asian economies," Matsumura said.
Hans Goetti, of Citigroup Asset Management in Singapore, said the Japanese economy was heading for a sustained recovery.
He said inflation was creeping back into the system, as Japanese consumers were tempted back into shops.
"The pent-up demand from all the cash lying around is tremendous.
"And we think at some point we are going to see a pick up and we think it will happen in the next few quarters," he told the BBC's World Business Reports.