The upbeat data may solidify expectations that a planned sales tax hike will go ahead in October, and offers some support for an economy hampered by faltering exports, slowing corporate earnings and factory activity.

Cabinet Office data released on Wednesday showed core machinery orders, a highly volatile data series regarded as an indicator of capital spending in the coming six to nine months, increased 5.2% in April from the previous month.

It marked the biggest gain since last October, and compared with economists' median estimate of a 0.8% decline in a Reuters poll. In March, orders rose 3.8%.

Capital spending has been a bright spot in the world's third largest economy, driven by investment in high-tech and labour-saving technology to cope with a labour crunch in the ageing society and refurbishing demand for upgrading old plants and equipment.

All the same, Japanese firms may turn cautious about boosting investment if uncertainty over the global economy and the bruising U.S.-China trade dispute persist, analysts say.

Underscoring the pressure on export-reliant Japan, external orders, which do not account for 'core orders' tumbled 24.7% month-on-month in April, reversing from the prior month's 9.0% gain and posting the biggest drop since November 2015.

"We think that rising uncertainty over the economic outlook will result in a slowdown in business investment growth over coming quarters," said Marcel Thieliant, senior Japan economist at Capital Economics.

TRADE WAR

Washington and Beijing have been locked in a tit-for-tat tariff war for nearly a year, which has curbed global trade and upended supply chains ranging from Asia to Europe, undermining Japan's exports and factory output.

Investors expect Japanese exporters' earnings will remain under pressure. Japanese companies are likely to report a 1% drop in pre-tax profits this fiscal year through March, Daiwa Securities said last month.

Big companies such as factory-robot makers Yaskawa Electric Corp and Fanuc Corp, as well as Mitsubishi Electric Corp and trading house Mitsui & Co have blamed the trade war and China's slowdown as they cut profit forecasts.

Still, solid domestic demand could dampen speculation that Prime Minister Shinzo Abe may once again postpone a twice-delayed sales tax hike to 10% from the current 8% in October.

The Cabinet Office data comes a week before the Bank of Japan holds its policy-setting meeting on June 19-20. The BOJ has vowed to continues its massive easing for at least another year in a nod to the rising economic strains, though the April headline numbers should be a confidence-booster to its view that domestic demand will pick up the slack left by weak exports.

The Cabinet Office raised its assessment of machinery orders, saying they are showing a pick-up, compared with its previous view that they were stalling.

"Investment remains on an upward trend overall," said Takumi Tsunoda, senior economist at Shinkin Central Bank Research Institute. "Investment sentiment of businesses isn't as weak as thought by the market."

Wednesday's data showed core orders from manufacturers jumped 16.3% month-on-month in April, boosted by internal-combustion engines, chemicals, transport and construction machinery. Non-manufacturers' orders rose 1.2% in April led by computers.

Compared with a year earlier, core orders, which exclude ships and electricity utilities, rose 2.5% in April, versus a 5.3% drop seen by economists, the Cabinet Office data showed.

(Reporting by Tetsushi Kajimoto; Editing by Sam Holmes & Shri Navaratnam)

By Tetsushi Kajimoto and Daniel Leussink