Updated

Japan's trade deficit ballooned to $9.8 billion in August, official data showed Thursday, underscoring how a weaker yen has sent the country's energy import bill soaring.

The monthly deficit of 960.3 billion yen was well up from a shortfall of 768.4 billion yen a year earlier, marking the worst-ever August deficit and extending a string of shortfalls to 14 months -- tying the previous record set more than three decades ago.

The data showed that a drop in the yen since late last year has helped Japan's exports, with the value of shipments rising 14.7 percent, helped by strong demand for vehicles.

And with strengthening demand in key export markets including the United States, China and Europe, Japan's trade picture was likely to brighten, said Credit Agricole economist Yoshiro Sato.

"Although the trade deficit is still large of late, the improvement in export outlook would mean that it would gradually narrow going forward," he added.

Imports jumped 16.0 percent last month, with energy costs soaring after the Fukushima atomic crisis forced Japan to switch off its nuclear reactors.

The mixed trade picture is largely a result of the weak yen, which boosts the costs of imports but also inflates the value of exports.

The yen has declined by about a quarter against the dollar in the past year, boosting exporters' competitiveness and their bottom line.

Japanese Prime Minister Shinzo Abe, who took office late last year, launched a policy blitz dubbed Abenomics that meshed government spending with a central bank monetary easing plan unveiled in April, which weighed on the currency.

The moves are aimed at rebooting the world's third-largest economy, which has suffered from growth-sapping deflation for years.

Tokyo has been keeping a close eye on recent economic data as it looks set to usher in a sales tax hike that some fear could derail efforts to stoke growth.

Raising taxes is seen as crucial to bringing down Japan's staggering national debt -- proportionately the worst among industrialised nations at more than twice the size of the economy.

Buoying hopes that a turnaround is under way, revised figures earlier this month showed Japan's economy grew more than initially thought in the June quarter, expanding 0.9 percent, up from a preliminary reading of 0.6 percent.

The trade data released Thursday showed that the value of shipments to the key US market jumped 20.6 percent from a year earlier, while exports to the troubled eurozone were up 18 percent.

Exports to China rose 15.8 percent despite a rumbling territorial dispute between Tokyo and Beijing that flared anew last year, denting trade ties.

Japan's energy import bills have surged since the country shut down its nuclear reactors following the crisis at Fukushima in March 2011, as it turned to price fossil fuel alternatives.

The country last suffered a 14-month run of monthly deficits from July 1979 to August 1980, caused by the oil shock.