Image copyright AFP Image caption Japanese exports rose for the first time in three months

Japanese exports showed a surprise rise in July, reigniting hopes of growth for the world's third largest economy.

Exports rose 3.9% when compared to one year ago, helped by higher shipments of cars and electric machinery. It is the first increase in three months.

Imports rose 2.3% in the same month, led by rising demand for oil and gas after the Fukushima disaster in 2011 led to a shutdown of nuclear reactors.

The government has pinned hopes of growth on an export-led recovery.

Japan's trade deficit widened to 964 billion yen ($9.4bn; £5.6bn) in July, compared to a deficit of 822bn yen in June.

Analysts are hoping the export recovery will help offset a slump in domestic demand. But not everyone is convinced the turnaround in exports will be enough to sustain Japan's economy in the long term.

"The data shows exports are recovering moderately as a trend, so external demand may offset some of the weakness in domestic demand ahead," said Takeshi Minami, chief economist at Norinchukin Research Institute.

"But export growth is unlikely to accelerate much from here. Europe's economy lacks momentum and this will weigh on growth of Japan's big Asian export markets like China," he added.

Tax effect

The Japanese economy contracted by an annualised 6.8% in the second quarter of the year, the biggest fall since 2011 when it was devastated by an earthquake and tsunami.

The shrinkage was largely in response to a government sales tax, which held back consumer spending.

Japan's sales tax had risen from 5% to 8% in April. That was the first rise in 17 years.

The government is scheduled to consider later this year whether to raise the sales tax by another 2%, to 10%, in 2015.