The population of foreign workers set a record of about 1.28 million in late October as rapidly graying Japan continued to rely on foreign trainees and students to make up for its labor shortage, the labor ministry said Friday.

The total of 1,278,670 is 18 percent higher than last year and the highest since comparable data became available in 2008, the Health, Labor and Welfare Ministry said.

Chinese led the way with 372,263 workers, up 8 percent on year, followed by the Vietnamese, whose numbers soared 40 percent to 240,259, accounting for 35 percent of the increase.

Filipinos came in third at 146,798, up 15.1 percent, followed by Brazilians at 117,299, up 10.0 percent, and Nepalese at 69,111, up 31.0 percent.

By residential status, permanent residents and spouses of Japanese climbed 11 percent to reach 459,132, while students with part-time jobs rose 24 percent to 259,604 from a year ago. The number of technical interns meanwhile grew 22 percent to 257,788.

Due to the tight labor market, Japan’s recovering economy and shrinking population, many of the technical interns and students are being hired to perform unskilled labor for low wages to fill serious manpower shortages.

While the government has opened its doors to professionals specializing in information technology and other specific fields, it does not officially welcome unskilled laborers to avoid public debates on immigration, which has long been a sensitive issue.

Foreign specialists comprise a small portion of the incoming workers, and many are hired by small firms with fewer than 30 employees, according to the ministry.

In the manufacturing industry, 40 percent of them were trainees brought in under the state-sponsored technical intern training program. In the service sector, which includes the hotel and restaurant industries, 60 percent were students.

As many foreigners seeking to gain skills or education are treated as laborers, the situation has raised concerns about corporate exploitation and the abuse of student visas for working purposes.

Japan relies heavily on foreign labor, and experts and scholars have been urging more public debate on immigration policy as Japan’s society continues to gray and shrink.