The number of foreign workers in Japan hit a record 1,658,804 as of October last year, up 13.6 percent from a year earlier, as companies increasingly hired them amid a labor shortage caused by the nation's rapidly aging population, government data showed Friday.

The labor ministry attributed the 12th straight yearly rise to a government policy aimed at bringing in more highly skilled foreign workers and hiring students for part-time jobs. It also said there was greater labor force participation by permanent residents and the spouses of Japanese due to improved employment conditions.

(A Vietnamese trainee works at a factory in Okazaki, Aichi Prefecture.)

The headline figure was the highest since comparable data became available in 2008. Trainees from developing countries under Japan's technical intern program also contributed to the increase, the Ministry of Health, Labor and Welfare said.

Workers of Chinese nationality accounted for about a quarter of the entire foreign workforce at 418,327, followed by Vietnamese at 401,326 and Filipinos at 179,685, it said.

The number of Chinese rose 7.5 percent from a year earlier, while the figures for Vietnamese and Filipinos were up 26.7 percent and 9.6 percent, respectively, the ministry said.

By sector, manufacturing hired the largest number of foreign workers at 483,278, or 29.1 percent of the total, followed by retail at 212,528, with 266,503 workers categorized under "other services."

By prefecture, Tokyo had the most foreign workers with 26.6 percent at 485,345, followed by Aichi Prefecture at 175,119 and Osaka at 105,379.

Japan created a new visa system on April 1, 2019, to bring in more blue-collar workers from overseas to address its acute labor shortage, marking a major policy shift from its traditionally strict immigration rules.

Separate data by the Immigration Services Agency of Japan showed Friday 189,000 new technical interns entered Japan in 2019, up 26 percent from the previous year. Under the newly established visa, 563 entered the country.