The Justice Ministry said they have stripped manufacturing giants Mitsubishi Motors Corp. and Panasonic Corp. of accreditation to accept foreign trainees under the Technical Intern Training Program, for ordering such workers to perform tasks other than those specified in their contracts and other violations.

The violations, which also prompted accreditation to be revoked for two other companies, may cost the firms a chance to benefit from the nation’s new blue-collar visa system aimed at addressing a national labor shortage.

The companies will be prohibited from accepting new foreign interns for the next five years, the ministry officially announced Friday, with the reprimand also suggesting that the government is stepping up efforts to curb abuses of technical trainees working under the program.

Ministry officials said 28 Filipino workers at Mitsubishi Motor’s plant in Okazaki, Aichi Prefecture, were recruited to conduct semiautomatic welding work using pre-programmed machines.

Instead they ended up assembling automotive components, in violations that spanned a period of over a decade and were first identified in May last year.

The reassignment was in violation of the Technical Intern Training Act, a 2017 law that requires stronger supervision of companies employing foreign nationals under the training program, officials said. Under the law, companies that want to hire foreign nationals as technical trainees are required to obtain accreditation for specific job types.

The ministry discovered that such practices had continued since the automaker started hiring foreign welders under the trainee program in 2008, the officials said, adding that the company had falsified the job descriptions for the trainees when it applied for the program.

“For years, the company made its workers perform work that differed from what was described in the accreditation application forms,” a senior official at the ministry’s Immigration Bureau told reporters.

Authorities discovered the misconduct last May during an inspection after suspicions emerged about abuses in the program. Officials said they deferred penalties to help the trainees affected resolve their individual situations. Of the 27 workers at Mitsubishi Motors who lost their jobs because of the malpractice confirmed by the ministry, three found new jobs. The others returned to the Philippines.

A Mitsubishi spokesman confirmed Friday evening that part of its technical training program abused the technical training act, and offered an apology “to all people involved in the program, including foreign trainees.” He said the firm had learned about the revocation just a few hours earlier.

Panasonic meanwhile lost permits for 82 Chinese and Malaysian workers hired to assemble electronic devices at its Toyama plant, the officials said. The Justice Ministry says companies found guilty of labor law violations are prohibited from hiring foreign trainees.

Panasonic’s spokeswoman Yuka Arii commented in a phone call that the firm was not aware its labor law violation would disqualify it from participating in the technical training program.

“We feel deeply sorry,” Arii said. “We have to accept with sincerity our situation and face the reality that we won’t be able toaccept (foreign trainees) for the next five years … and that we may be left without any trainees among our workforce.”

The firm is now helping all of its 158 foreign trainees find employment by the end of the year “to ensure they can continue the training,” Arii said.

The ministry also punished two other firms.

Automotive parts supplier Aisin Sinwa Co., based in Toyama Prefecture, had hired 24 Chinese for casting and metal working but found its accreditation revoked after the ministry determined that a deadly accident at its factory broke safety laws. The revelation resulted in the annulment of its eligibility to hire foreign workers.

Meanwhile, the operator of Ibaraki Prefecture-based construction firm Daibari, which employed three Thai nationals to conduct rebar reinforcement work, lost its permit after a local court sentenced the owner for breaking inheritance tax laws.

The penalties will likely affect the four companies’ labor-shortage strategies.

New visa legislation allowing companies struggling with labor shortages to hire blue-collar workers with “certain skills” takes effect in April. Japan expects to accept 345,000 workers over the next five years mainly from nine Asian countries, including Vietnam, Cambodia and Myanmar. Welding and electronic assembly jobs are among those offered in 14 industries under the program.

Mitsubishi Motors and Panasonic already rely on foreign laborers. But they are likely to face challenges recruiting both unskilled and skilled workers who are expected to enter Japan within a five-year period starting from fiscal 2019, which starts on April 1.

In the wake of the violations, the firms won’t have the necessary permission to extend the stays of their current trainees and won’t be accredited to accept new trainees for the next five years.

“They will also likely be prohibited from accepting foreign workers under the new legislation,” provided the government enacts the proposed drafts of planned ordinances and regulations that will set conditions for employing migrant workers, the senior official said.

The proposed ordinances will specify that firms penalized for violations of the Immigration Control and Refugee Recognition Act or other labor-related laws won’t be allowed to accept foreign workers for a five-year period.