Japan will temporarily nullify 2.8 million visas held by Chinese and 17,000 held by South Koreans to prevent the new coronavirus from spreading in the country, the Foreign Ministry said Friday.

The step is part of measures announced a day earlier by Prime Minister Shinzo Abe, facing a barrage of criticism for his belated response to the outbreak, to toughen border controls and restrict travel from the neighboring countries.

The two countries reacted very differently, with South Korea denouncing the move and pledging to take similar steps in retaliation, while China accepted Japan's new restrictions as appropriate to safeguard public health.

The visas, including those issued to citizens from Hong Kong and Macau, will become invalid from Monday through March 31, with Japanese Foreign Minister Toshimitsu Motegi saying what happens past that point will depend on whether the coronavirus situation improves or worsens.

Chinese and South Korean visitors already in Japan will not have their periods of stay terminated, but if they leave the country they will not be able to re-enter using the same visas while the temporary nullification is in force.

Until the end of March, Japan will also ask all travelers from China and South Korea to remain quarantined in government-designated facilities for two weeks.

Health minister Katsunobu Kato said foreign nationals traveling from the two countries will likely be requested to stay in hotels, while Japanese will be asked to stay at home.

During the quarantine period, accommodation and transportation fees need to be paid out of pocket in principle, the health ministry said, providing a strong deterrent to would-be visitors.

"It is a request," Kato said at a press conference, noting that the measure is not mandatory.

(Chinese tourists wear masks in Tokyo)

Related coverage:

Coronavirus uncertainties deal heavy blow to Japan auto industry

Student creates online map charting coronavirus cases across Japan

Dog of coronavirus patient in Hong Kong tests positive for virus

Japan will also suspend a visa-waiver program covering short stays by tourists from South Korea, Hong Kong and Macau.

Japan's economy, still reeling from a consumption tax hike and natural disasters, is also expected to take a hit.

The restrictions drew a strong backlash from South Korea, which took reciprocal steps, including suspending the validity of existing visas and halting its visa-waiver program for Japanese citizens from Monday.

Foreign visitors have already sharply decreased in February, plunging below 1 million, or less than half of the 2.37 million recorded a year earlier, immigration authorities said.

Visitors from China, hit hardest by the outbreak of the virus that causes COVID-19 pneumonia which was first detected in Wuhan in December, fell sharply, failing to reach 60,000, less than a tenth of the 658,000 a year earlier, according to the Immigration Services Agency.

On a daily basis, 35,000 foreign nationals entered Japan in February, compared with 85,000 a year ago.

The data, released during a parliamentary committee session at the request of an opposition lawmaker, gave a glimpse of the potential economic impact of the outbreak, with Japan's tourism industry heavily reliant on Asia.

Of total visitors to Japan in 2019, those from China and South Korea accounted for over 40 percent.

Some were already bracing for a harder hit.

"If Japanese are also required to stay (in facilities for two weeks), it will reduce travel for business purposes," an official of the Japan Association of Travel Agents said, expressing concern that the movement of people will halt between Japan, and China and South Korea.

Japan's coronavirus quarantine measures have come under scrutiny following its decision last month to confine about 3,700 passengers and crew on the Diamond Princess cruise ship near Tokyo for two weeks.

The total number of infections topped 1,000 in Japan this week, including around 700 from the vessel. China has recorded over 80,000 cases and South Korea over 6,500.