France said Monday that it would follow other European countries in confining residents mostly to their homes during the COVID-19 pandemic, while the European Union considered closing its external borders to foreign travelers to impede infections.

French President Emmanuel Macron said that starting on Tuesday, people would be allowed to leave the place they live only for necessary activities such as shopping for food, going to work or taking a walk.

"From tomorrow at noon and for at least 15 days, our trips will be greatly reduced" Macron said in a televised address.

Macron said the government would provide further details, but he told the French people that everyone should stay at home, go out just for the "bare essentials" and commute to work only if working from home isn't feasible.

Anyone caught violating the new measures will be punished, he said.

The restrictions appeared to put France under a lockdown similar to the ones imposed last week in Italy and Spain in response to the virus. While the restrictions are in effect, residential gatherings with family and friends will be prohibited, the president said.

“We are at war,” Macron said repeatedly in his address.

French Interior Minister Christophe Castaner subsequently specified that all people circulating on France's streets will have to justify, upon request, why they were out and about. Forms stating the purpose of “essential” outside travel — such as going to the bakery to buy a baguette — will be available for downloading, Castaner said.

People without valid reasons will be subject fines ranging from 38-135 euros ($43-$151), the minister said. Castaner said 100,000 police would be deployed in the coming days to enforce the lockdown.

The French plan was announced almost a week after a nationwide lockdown took effect in Italy, the country with the most reported virus cases in the world except for China.

Spain followed suit over the weekend, while other EU nations have adopted ad hoc national measures, including partial border closures.

As of earlier Monday, six of the 10 countries with the highest numbers of reported virus cases worldwide are in Europe: Italy, Spain, Germany, France, Switzerland and the U.K. France has reported a total of 6,633 cases, including 148 deaths.

British authorities also ramped up public health measures Monday, telling people who are in the groups considered most vulnerable to severe COVID-19 illness to stay at home for three months.

Prime Minister Boris Johnson said people with “the most serious health conditions” should be “shielded” from social contacts for 12 weeks, starting this weekend. He mentioned people over 70, those with chronic illnesses and pregnant women as particularly at risk.

It was unclear whether everyone in the those groups was being told to stay home for 12 weeks. Johnson said the government was advising the entire population “to stop non-essential contact with others and to stop all unnecessary travel.”

"You should avoid pubs, clubs, theaters and other such social venues," he said at a news conference alongside his chief medical and scientific advisers.

For most people, the virus causes only mild or moderate symptoms, such as fever and cough. For some, especially older adults and people with existing health problems, it can cause more severe illness, including pneumonia.

While national governments across Europe have taken a range of measures to contain the virus from moving into and within their countries, the 27 members of the European Union are looking at closing the EU's external borders to most foreign travelers.

In recent days, the EU has been urging its members to put common health screening procedures in place at internal borders but not to block shipments of medical equipment. EU officials fear that countries acting alone and without coordination might make things more difficult for neighbors whose health-care systems are already creaking.

The proposed travel restrictions will be put to to the bloc's 27 leaders at a summit to be held via video-conference Tuesday. European Commission President Ursula von der Leyen said the plan calls for them to be in place for an initial period of 30 days.

Exemptions could be given to long-term residents in the EU, border area workers, family members of European nationals and diplomats. British citizens would not be included in the ban, even though the country officially withdrew from the EU on Jan. 31

“Essential staff such as doctors, nurses, care workers, researchers and experts that help address the coronavirus should continue to be allowed in the EU," von der Leyen said.

Transport workers also could receive exemptions to ensure supplies of “essential items such as medicine, but also food and components that our factories need," she said.

Asked whether she thinks Europe will return to having its passport-free travel area once the pandemic subsides, German Chancellor Angela Merkel said she hoped so and noted that so far "coordination didn't work well everywhere the way one would have hoped.”

Merkel added that public health strategies in the EU should guarantee goods flow freely and ensure that Europeans can continue making cross-border commutes for work.

“We will certainly need to continue talking (about this) in a European format," she said. "But from our perspective, these are time-limited measures that serve to reduce the risk of infection.”

Germany was preparing to shut non-essential shops, bars, museums and many other facilities and to limit restaurant opening times. Merkel’s office said Monday that overnight hotel stays will be allowed only for “necessary and expressly not for tourist purposes.”

Greek authorities announced that anyone entering the country from abroad would be subject to compulsory self-quarantine for 14 days. The health ministry’s top infectious diseases official, Sotiris Tsiodras, noted that many young people were returning “from countries where there is a large spread of the virus, such as the United Kingdom, whose public health strategy is to allow the virus to spread.”

Separately Monday, the Russian government announced that it has decided to bar entry to all foreigners starting Wednesday and until May 1. The move will not apply to diplomats, foreigners permanently staying in Russia, plane and ship crews and truck drivers.

Ukraine’s president also instructed his Cabinet to close the subway, shopping malls and restaurants, cut passenger train and air links, and to ban gatherings of more than 10 people.