Japan's economy grew at a stronger-than-expected annualized real 6.0 percent in the April-June quarter on robust auto exports and a revival in inbound tourism, though an unexpected drop in private consumption cast a pall over the outlook, preliminary government data showed Tuesday.

Real gross domestic product, adjusted for inflation, increased for the third straight quarter, marking the fastest growth since the October-December period in 2020. It increased 1.5 percent from the previous quarter.

The data beat the average market forecast of a 2.41 percent expansion in a poll by the Japan Center for Economic Research.

Japan's economy expanded to 560.74 trillion yen ($3.9 trillion), returning to its pre-pandemic level and reaching its biggest size ever in real terms. GDP is the total value of goods and services produced in a country.

"Domestic demand was unexpectedly weak despite the strong headline GDP number. Exports were robust but imports fell, partly reflecting slackening demand at home," said Saisuke Sakai, a senior economist at Mizuho Research & Technologies.

Private consumption dipped 0.5 percent as rising prices for everyday goods hit consumer spending and durable goods sales declined, more than offsetting strong demand for services such as dining out and hotel stays.

Capital investment, another key component of domestic demand, grew 0.03 percent, rising for the second straight quarter, supported by software-related spending.

The slight increase came despite an earlier Bank of Japan survey showing that companies have bullish investment plans for the current business year to next March. Japanese companies are ramping up investment on digital and green transformations as well as in automation to cope with acute labor shortages.

Weak domestic demand bodes ill for the economy at a time when aggressive interest rate hikes in the United States and Europe have raised concern about a global economic recession.

Up to now, private consumption has received support from spending on services, including for dining out and traveling, even as real wages have been on a downtrend due to quickening inflation.

Such pent-up demand has helped the hotel, tourism and other nonmanufacturing sectors that were battered by COVID-related curbs.

"After passing on higher costs, companies are increasingly aware of inflation fatigue among consumers and price hikes will be less aggressive in the coming months. While real wages have been falling, slowing inflation will likely support consumption," Sakai added.

Japan's inflation rate is forecast to remain elevated even as the impact of surging import costs for fuel, raw materials and food have been waning. The BOJ, for its part, has stuck to ultralow rates, assessing that stable 2 percent inflation has not been achieved.

A weaker yen has inflated import costs for resource-scarce Japan, while benefiting exporters by boosting their overseas earnings and enhancing the purchasing power of foreign visitors as Japan revs up inbound tourism.

Exports jumped 3.2 percent after the easing of supply disruptions boosted auto exports. A steady recovery in the number of foreign tourists to Japan continued to give the economy a boost, with their spending counted as exports in GDP.

Imports, meanwhile, fell 4.3 percent amid decreased energy and COVID vaccine imports.

Economists say the world's third-largest economy is forecast to see modest growth in the coming quarters.

"Spending by inbound tourists will likely increase in July to September but we cannot expect high (GDP) growth to continue because of weak domestic demand," said Toru Suehiro, chief economist at Daiwa Securities.

"Pent-up demand for services that are swayed by seasonal factors such as trips will likely remain. But we need to keep in mind that demand for eating out may have already peaked," he added.

Public investment rose 1.2 percent.

Nominal GDP grew 2.9 percent from the previous quarter, or 12.0 percent at an annualized rate.