Japan will ask travelers from Europe as well as Egypt and Iran to self-quarantine for 14 days after their arrival, in an attempt to contain the spread of the new coronavirus, Prime Minister Shinzo Abe said Wednesday.

The temporary measure from Saturday to the end of April will target all travelers from 38 countries, Abe told a meeting of a government task force on fighting the coronavirus. They include 27 members of the European Union, Britain and Monaco.

During the two-week period, visitors from the targeted countries will be asked not to use public transportation in Japan.

The Japanese Foreign Ministry will invalidate visas already issued to people from the 38 countries also from Saturday to the end of April.

Starting Thursday, Japan will also strengthen its border controls by imposing an entry ban on parts of Spain, Switzerland and Italy as well as all of Iceland. Foreign travelers who have been to the areas within 14 days of arrival in Japan will be refused entry "for the time being," Abe said without elaborating.

Japan is scrambling to prevent a surge in domestic infections with the Tokyo Olympics roughly four months away. The viral outbreak has led countries around the world to impose travel restrictions, casting a pall over the global economic outlook.

The latest steps mirror those already taken for travelers from China and South Korea, both hit hard by the viral outbreak that has spread globally and is now characterized by the World Health Organization as a pandemic.

As the number of cases has totaled around 180,000 globally, Abe called on Japanese citizens to exercise caution if they plan to go overseas, issuing a "Level 1" warning, the lowest, for the rest of the world.

For Iceland and parts of regions in Italy, Spain and Switzerland, which are subject to the entry ban, Japan has already warned its citizens to avoid all travel there by raising the alert to Level 3.

The ban covers the northern Italian regions of Valle d'Aosta, Trentino-Alto Adige, Fruili-Venezia Giulia and Liguria. Also included are the Swiss cantons of Ticino and Basel-Stadt, along with the Spanish provinces of Madrid and La Rioja as well as Navarre and the Basque Country.

The epicenter of the viral outbreak that began in China in December has shifted to Europe, triggering unprecedented steps by the European Union, which promotes the free movement of goods and people. The United States has already restricted travel from Europe.

EU leaders agreed Tuesday to impose a 30-day restriction on nonessential travel to the bloc to limit the spread of the virus. Italy, hit by the largest number of infections after China, has already imposed a nationwide lockdown.

French President Emmanuel Macron has ordered people in France to stay at home for up to 15 days.

Related coverage:

Infected man in Japan who wanted to "spread virus" dies

Osaka to offer free school lunches as coronavirus hits local economy

More parents in Japan turn to apps for child care as virus shuts schools