The contentious legislation passed only months after Prime Minister Shinzo Abe proposed the plan despite opposition groups' demand for more thorough debate to address concerns about a drastic change of policy.
It's seen as an unavoidable step as the country's population of about 126 million rapidly ages and shrinks. Many short-handed industries, especially in the services sector, already rely heavily on foreign "trainees" and language students. Japan also selectively grants visas to white-collar professionals, often from the West.
Bringing in foreign laborers is a last resort after Abe's deeply conservative government tried to meet labor shortages by encouraging more employment of women and older workers and using more robots and other automation.
"Japan has come to a point where we had to face the reality that there is serious depopulation and serious aging," said Toshihiro Menju, an expert on foreign labor and population issues at the Japan Center for International Exchange.
"Shortages of workers are so serious ... that (allowing) immigrants is the only option the government can take," he said.
Abe's latest plan calls for relaxing Japan's visa requirements in sectors facing severe labor shortages such as construction, nursing, farming, transport and tourism - new categories of jobs to be added to the current list of highly skilled professionals.
The number of foreign workers in Japan has more than doubled since 2000 to nearly 1.3 million last year, out of a working-age population of 67 million. Workers from developing Asian countries used to stay mostly behind the scenes, but not anymore. Almost all convenience stores are partly staffed by Asian workers and so are many restaurant chains.
The fastest growing group of foreign workers is Vietnamese, many of whom are employed in construction and nursing. Construction workers are particularly in demand as Japan rushes to finish building venues and other infrastructure for the 2020 Tokyo Olympics.
In many cases the workers are subjected to poor working conditions and other abuses.
"I had no time for a holiday. ... Even if I worked so hard I still had no money," said Eng Pisey, 33, from Cambodia, who came to Japan on a training program in 2016 and worked at a garment factory in Tochigi, north of Tokyo. She said she had to borrow $4,000 to pay a broker to arrange her job, and ended up quitting after becoming ill from overwork.
Under the legislation, two categories of workers will be accepted beginning in April: less-skilled workers and former interns with basic Japanese competency are allowed to stay in the country for only up to five years as visitors and cannot bring in family members. That is meant to encourage them to leave when their visas expire, preventing them from settling in Japan.
The second category, those with higher skills, Japanese language and cultural understanding, would be allowed to bring their families and apply for citizenship after living in Japan for 10 years if they commit no crimes.
"Creating new visa statuses to accommodate foreign human resources is our urgent task as we face serious labor shortages, especially at small and medium-size companies," Chief Cabinet Secretary Yoshihide Suga said Friday.
But details including a new immigration agency, competency tests for applicants and ways to eliminate abusive working conditions still need to be decided.
Many Japanese understand the need to solve labor shortages. Industry groups have urged the government to expand the work visa program so they can legally hire more foreign workers.
But Abe's traditional political base and opposition groups oppose the change - for different reasons.
Abe has denied that Japan is opening the door to immigrants. His right-wing supporters view Japan as a homogenous society and want to keep out outsiders, especially those from other Asian countries. They cite concerns over risks of more crime.
Human rights activists and lawyers have criticized the legislation, saying it has insufficient protections and support for foreign workers and lacks a vision for how Japan might create a more inclusive society that accepts diversity.
Since 1993, Japan's Technical Intern Training Program has provided on-the-job training in the name of international cooperation, mostly to workers from other Asian countries. The trainees often have worked under poor conditions. In 2017 some 7,000 of the 270,000 technical interns fled, citing underpay and mistreatment, according to government statistics.
Shoichi Ibusuki, a lawyer specializing in labor cases who aids victimized foreign students and interns, says the program is a guise for using cheap labor. He says it should be scrapped and replaced.
Ibusuki supports giving unskilled workers official status, but says the legislation fails to provide enough protections for workers. In particular, he is unhappy with the lack of restrictions on recruiting brokers who are cited as a cause of abuse. "The program seems to treat foreign workers like goods, not humans," he said.
Huang Shihu, a Chinese intern, said he came to Japan to study the language while working, but suffered a severe hand injury after being employed for about six months at a tin factory in Kobe. He said his employer claimed it could not pay him compensation because it was bankrupt.
"With this hand injury I can't work. I don't know what to do," Huang told reporters, showing his still bandaged fingers. "I really feel wronged by the company."
Menju said the lack of oversight in the existing trainee program allowed mistreatment to persist, with foreign workers seen as cheap labor willing to tolerate harsh conditions. He hopes the new program will allow a fresh start.
The legislation is not so great, he says, but may mark a turning point. "This is the first time people started to discuss the issue of foreign workers," Menju said. "Before that it was a taboo."
Follow Mari Yamaguchi on Twitter at https://www.twitter.com/mariyamaguchi
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.