TOKYO — In many ways, Yogendra Puranik is an immigrant success story.

Puranik, 45, joined the initial wave of Indian tech workers who went to Japan in the early 2000s. He became a Japanese citizen and in 2019 won elected office in Tokyo, a first for anyone from India. This year, he was hired as the principal of a public school.

Now though, as Japanese companies scramble to lure more highly educated Indians like Puranik to fill a yawning shortage of IT engineers, he is under no illusion about the challenges that Japan, and those it attracts, will face.

Recruiters call it a crucial test of Japan’s ability to compete with the United States and Europe for increasingly sought-after global talent. But lower pay and steep language and cultural barriers make Japan less attractive for many. Rigid corporate structures can frustrate newcomers. And Japan, which has long been ambivalent about the presence of foreigners, lacks an established system to integrate them into Japanese life.

“These foreigners are coming, and there is no communication between the Japanese and foreigners,” Puranik said at his home in an Indian neighborhood in eastern Tokyo. “There is no inclusivity happening.”

As it rapidly ages, Japan desperately needs more workers to fuel the world’s third-largest economy and plug gaps in everything from farming and factory work to elder care and nursing. Bending to this reality, the country has eased strict limits on immigration in hopes of attracting hundreds of thousands of foreign workers, most notably through a landmark expansion of work visa rules approved in 2018.

The need for international talent is perhaps greatest in the tech sector, where the government estimates that the shortfall in workers will reach nearly 800,000 in the coming years as the country pursues a long-overdue national digitization effort.

The pandemic, by pushing work, education and many other aspects of daily life onto online platforms, has magnified the technological shortcomings of a country once seen as a leader in high tech.

Japanese companies, particularly smaller ones, have struggled to wean themselves from physical paperwork and adopt digital tools. Government reports and independent analyses show Japanese companies’ use of cloud technologies is nearly a decade behind those in the United States.

India produces a vast pool of 1.5 million engineering graduates each year who could help Japan play digital catch-up. When Indian workers do answer the call, many speak admiringly of the cleanliness and safety of Japanese cities, and say their salaries allow them to live comfortably, if not lavishly.

Yet the Indian newcomers mostly admire Japan from across a divide. Many of Japan’s 36,000 Indians are concentrated in the Edogawa section of eastern Tokyo, where they have their own vegetarian restaurants, places of worship and grocery stores. The area has two major Indian schools.

Nirmal Jain, an Indian educator, said she founded the Indian International School in Japan in 2004 for children who would not thrive in Japan’s one-size-fits-all public education system. Jain said that separate schools are appropriate in a place like Japan, where people tend to keep their distance from outsiders.

“I mean, they are nice people, everything is perfect, but when it comes to person-to-person relationships, it’s kind of not there,” she said.