TOKYO (Reuters) - Japanese exports rose in July at the fastest annual pace in nearly three years as the benefits of a weak yen finally started to take hold, and brisk sales of cars and electronics to the United States, Asia and Europe showed a recovery in overseas demand.

Workers load containers from trucks onto a cargo ship at a port in Tokyo August 19, 2013. REUTERS/Toru Hanai

Japan still ran its third-biggest trade deficit on record at 1.02 trillion yen ($10.5 billion) in July, as the weak yen and rising oil prices made energy imports ever more expensive, which may drag on corporate profits ahead.

Analysts expect the world’s third-largest economy to head for a steady recovery, although some warn of risks such as the continued slowdown in China, Japan’s biggest trading partner.

“As a trend, exports are recovering and will keep growing because the positive effect of the weak yen will strengthen in coming months,” said Yoshiki Shinke, chief economist at Dai-ichi Life Research Institute in Tokyo.

“Hopefully that will offset risks, notably the possibility that China’s economic recovery will remain weak.”

The 12.2 percent rise in exports in the year to July was less than a median estimate for a 13.1 percent increase but was the biggest gain since December 2010, data released on Monday by the Ministry of Finance showed.

Exports to the United States, Asia and Europe all accelerated. Export volume also rose for the first time in over a year, offering more evidence that overseas demand could strengthen further.

“We expect exports to continue to recover,” said Hiroaki Muto, senior economist at Sumitomo Mitsui Asset Management in Tokyo. “The details are encouraging because you can see that exports to Japan’s main markets are bouncing back.”

A depreciation of around 20 percent in the yen since November, when markets began expecting the aggressive easing in monetary policy undertaken by the Bank of Japan in April, has boosted the competitiveness of the export-driven economy.

Japanese auto giant Toyota Motor Corp 7203.T was among those that benefited from a weak yen and a pickup in overseas demand, posting a near-record quarterly profit and raising its earnings profit for the year to March 2014.

OUTLOOK MURKY

Japan’s economy expanded for three straight quarters in April-June as Prime Minister Shinzo Abe’s reflationary policies brightened sentiment and bolstered personal consumption.

But growth slowed in the second quarter on an unexpected fall in capital expenditure, casting doubt on whether the economy can withstand the pain from a planned sales tax hike next April.

Policymakers see export growth as key in gauging the economic outlook and hope that global growth will accelerate enough to make up for the expected downturn in personal spending after the tax hike.

For now, the signs are positive.

Exports to the United States, which bought the most Japanese goods in July, rose 18.4 percent, faster than in June and marking the seventh straight month of gains. Exports to China grew 9.5 percent year on year in July, more than a 4.7 percent annual increase in June.

Rising costs of energy and raw material imports, however, may weigh on corporate profits. Almost all of Japan’s nuclear reactors have remained idle since the Fukushima disaster in March 2011, putting extra pressure on the energy import bill.

Imports rose 19.6 percent in July, the biggest gain in three years and more than the median estimate for a 15.4 percent increase, due to a jump in the cost of imports for crude oil and liquefied natural gas, the ministry data showed.

As a result, the trade deficit shot up to 1.02 trillion yen, well above the median estimate for a 785.6 billion yen deficit, and exceeding 1 trillion yen for the first time since January.

“This is a pretty big deficit and a negative for Japanese companies that will suffer from rising costs,” said Shinke of Dai-ichi Life Research.

“Japan probably won’t see a trade surplus until well into the business year starting in April 2015,” Shinke said.