TOKYO -- The number of foreigners living in Japan reached a record 2.83 million at the end of June, according to official data released Friday, which also indicates a preference for big cities that runs counter to the government's goals.

The figure, a 3.6% increase from the end of last year, represents 2.24% of Japan's total population and is on track for a seventh straight year of growth. The data excludes short-term visitors staying less than three months but covers medium-term residents such as students from overseas.

Permanent residents made up the largest share at 784,000, or 28%, followed by technical intern trainees and foreign exchange students at 13% and 12%, respectively. Only 20 residents came in under the new "specified skilled worker" visa introduced in April, though the number has likely increased since, as immigration authorities had approved 376 applications as of Sept. 27.

Efforts by the government and businesses to attract talent from abroad have paid off, with highly skilled professionals up 18% from six months earlier. Immigrants in the "engineer/specialist in humanities/international services" category rose 14%.

"In recent years, there has been an increase in employment of foreigners who have graduated from universities, technical schools or graduate schools and have specialized knowledge," the immigration bureau noted.

China was the most represented country of origin among foreign residents, accounting for more than a quarter of the total, followed by South Korea and Vietnam. The Vietnamese population showed the largest increase at 12%.

The data suggests that policies encouraging immigration have translated into concrete results, but some have not proven as effective as hoped. The government seeks to leverage immigration in its campaign to revitalize depopulated regions -- one of its signature policies -- but despite its efforts, immigrant workers still tend to gravitate to Japan's largest cities.

Tokyo is home to more than a fifth of all foreign residents with about 581,000, leading the list by a wide margin. Aichi Prefecture, where Nagoya is located, ranked second with 273,000. Osaka Prefecture and Tokyo-adjacent Kanagawa Prefecture placed third and fourth with 247,000 and 228,000. Nearly half of all foreigners live in these four areas.

"Foreigners tend to congregate in major cities, not just in Japan, but also overseas," said Yutaka Okada, senior research officer at Mizuho Research Institute. Okada attributed this to higher wages in urban areas, especially in the services sector, as well as the development of immigrant communities that help support newcomers.

"With the ratio of job seekers to job openings exceeding 1, regional labor shortages won't be resolved unless more attractive wages and working conditions are available," Okada said.

In anticipation of the new visa program, the central government adopted 126 measures last December to draw foreign workers and help them integrate. Though the main goal of the plan was to help immigrants in their daily lives, it was also intended to encourage them to spread out beyond the big cities. The policy framework was expanded in June to provide rent subsidies and house-hunting assistance to immigrants in outlying areas.

The country is grappling with a similar problem with Japanese nationals, especially young people. Tokyo and the nearby prefectures of Kanagawa, Chiba and Saitama together saw an increase of 140,000 residents last year, with 127,000 of these between the ages of 15 and 29, government data shows.