In a sign the country is opening up its insular job market, the Japanese government decided Tuesday to welcome more than 500,000 foreign workers through fiscal 2025 to offset the labor shortage in industries such as agriculture and construction.

The move will be written into Prime Minister Shinzo Abe's new economic policy outline due out in mid-June, with the necessary legal revisions to be submitted to parliament this autumn.

Foreign workers will be allowed to stay in Japan for five years under a new framework that covers five industries -- agriculture, construction, lodging, nursing and shipbuilding.

They will be required to pass a test demonstrating proficiency in the relevant field and the Japanese language. Those who go through the country's foreign trainee program will be exempt from the test and can stay for a total of 10 years.

The framework will make inroads into solving a severe labor crunch in Japan while creating jobs for foreign workers, which have thus far been limited to highly specialized positions due to concerns that an influx of immigrants could lead to a rise in crime.

Lawmakers within the ruling Liberal Democratic Party continue to harbor such worries, with Abe saying in February that he does not intend to open the country up to immigrants.

Reflecting this, the framework will include the five-year limit as well as barring foreign workers from bringing family members with them.

Companies that hire foreign workers will be required to submit a plan of support that includes assisting the workers find housing and take language classes. Small businesses will be able to ask a government-certified organization for help.

A record 1.28 million foreigners were working in Japan in 2017, more than double the 480,000 in 2008. Nearly a third of them, at 29 percent, were from China, followed by 19 percent from Vietnam, 12 percent from the Philippines, 9 percent from Brazil and 5 percent from Nepal.

Meanwhile, the country is suffering from a severe labor shortage as postwar baby boomers leave the workforce, with businesses reporting the worst conditions since the early 1990s in a Bank of Japan survey conducted in March.