The number of foreign visitors and spending by the tourists in the first six months of 2017 both hit record highs, government data estimates showed Wednesday.

The Japan Tourism Agency said the number of foreign visitors in the January-June period grew 17.4 percent from the same six-month period a year earlier, reaching a record 13.76 million due mainly to an increase of South Korean tourists.

By countries and regions, visitors from South Korea accounted for the largest portion of foreign tourists in the period at 3.40 million, up 42.5 percent, followed by China at 3.28 million, up 6.7 percent, and Taiwan at 2.29 million, up 6.1 percent.

Those from Hong Kong also showed a notable increase of 24.8 percent to 1.08 million, according to the agency.

There have been more travelers from South Korea and Hong Kong due in part to an increase in flights offered by low cost carriers, the agency said.

Foreign tourists spent a record ¥2.05 trillion in the half-year period up 8.6 percent from the previous year, according to the agency, marking the first time spending has topped ¥2 trillion.

Spending per visitor in the past three months to June, however, shrank 6.7 percent to ¥149,248 for the sixth consecutive quarter of decline, reflecting decreased spending by Chinese tourists once known for extravagant shopping habits. No per capita data were provided for the half year period.

Britain topped the rankings of spending per visitor in the second quarter of 2017 at ¥251,171, up 36.2 percent, followed by Italy at ¥233,110, up 25.2 percent, and China at ¥225,485, up 2.5 percent.

In June alone, a record 2.35 million foreign tourists visited Japan, marking an 18.2 percent increase from a year earlier, the agency said.

The agency said 16 out of the 20 economies renewed their record of monthly visitors in June and the monthly figure of Taiwanese visitors hit an all-time high in the month.