Japan's economy shrank much less than expected in the second quarter as companies made restored output after the earthquake, but a soaring yen and slowing global growth cloud the prospects for a sustained recovery.

Analysts expect the world's third-largest economy to rebound in the third quarter, probably expanding at the fastest rate among major industrialized nations as exports and factory output return to pre-disaster levels. But growing risks could strain a dwindling set  of policy tools.

Gross domestic product fell 0.3 percent in the second quarter, less than a median forecast for a 0.7 percent contraction and a 0.9 percent decline in January-March.

The better-than-expected reading helped push up the Nikkei benchmark <.N225> by about 1 percent, which has also tracked gains in global markets last week supported by a short-selling ban on financial stocks in Europe.

But worries that Europe's sovereign debt problems could escalate into another global crisis could rob Japan of much-needed export demand, increasing the chance of further yen-selling intervention and monetary easing to secure economic recovery.

Government officials highlighted risks posed by the strong yen and global slowdown to the export-reliant economy, saying they stood ready to act against rapid yen rises while urging the central bank to keep supporting the economy.

"The economy will show a V-shaped rebound in July-September as supply chains are on the mend to help boost exports," said Yoshiki Shinke, chief economist at Daiichi Life Research Institute.

"But the momentum will weaken from October-December onwards, although it won't fall back into a slump, as the pace of recovery in external demand slows. In fact, the world economy may even start sputtering," he said.

Economics Minister Kaoru Yosano urged the Bank of Japan to keep helping the recovery with ample liquidity injections into the market and a loose monetary policy.

"We will be closely watching the impact growing global economic uncertainty and yen rises would have on Japan's economy," Yosano told reporters.

Market intervention combined with a further increase of the central bank's asset buying operation and some form of financial support for most affected companies are the few remaining options Tokyo has to cope with the yen's strength.

The yen, driven by broad dollar weakness, has risen about 5 percent in just over a month to just below its all-time highs of 76.25 to the dollar and above levels major Japanese companies have been using in their earnings estimates.

On an annualized basis, the economy contracted 1.3 percent against a median forecast of a 2.6 percent annualized decline. That contrasted with U.S. annualized growth of 1.3 percent in the same quarter.

Companies restocked inventories more than expected after drawing them out in the preceding quarter, while public investment rose for the first time in six quarter thanks to post-quake reconstruction.

Private consumption, which makes up around 60 percent of the economy, eased 0.1 percent in April-June, a much smaller drop than expected due to one-time factors such as the switch to digital broadcasting boosting television sales.

But some analysts took tepid growth in corporate capital spending as a sign of companies' wariness about boosting investment due to the yen's rise, stagnating global demand and uncertainty over Japan's policy outlook.

Corporate capital spending rose 0.2 percent, less than the market forecast of a 0.5 percent increase.

External demand, or net exports, pushed down GDP by 0.8 percentage point, as the disaster prevented some Japanese manufacturers from shipping goods abroad.

Japan intervened in the currency market and eased monetary policy on Aug. 4, aiming to curb the yen's rise.

Analysts expect the economy to emerge from recession in July-September, after three straight quarters of contraction, but there is a growing uncertainty about global demand and the scope and timing of reconstruction spending at home.

(Additional reporting by Kaori Kaneko, writing by Leika Kihara and Tetsushi Kajimoto, editing by Tomasz Janowski)