LONDON — Britain, which had stood apart from other nations in the relaxed nature of its response to the coronavirus, hardened those measures significantly on Monday, urging people to stop going to pubs or restaurants, and putting in place strict quarantine policies for those infected by the virus.

The shift, announced by Prime Minister Boris Johnson after a meeting of a government crisis committee, brought Britain closer in line with Italy, France and Germany, which have closed borders and shut down large parts of their countries. But Britain is still putting off some steps, most conspicuously the closing of schools.

With reported cases of the virus surging to 1,543, an increase of 171 in a single day, Mr. Johnson said Britain was on the cusp of a rapid spread that demanded more draconian countermeasures. He likened the latest steps to the kinds of changes the British people were asked to make in wartime.