“From a public health perspective, if we think that if testing is needed and people are not willing to take a test, that hinders our work,” said Sophia Chan, the health secretary.

She said the authorities were considering legal options for mandating testing if necessary, while acknowledging that members of the public might have concerns about any such arrangement.

Last month Hong Kong eased some restrictions, allowing gyms and spas to reopen and expanding the limit on group gatherings to four people. But health authorities say they are preparing for another possible spike in infections.

“We don’t think the situation is looking good because of the increased number of confirmed cases,” said Ms. Chan.

She noted that research by the University of Hong Kong showed the rate of the coronavirus spread was increasing once again. On Thursday, Hong Kong reported 18 new coronavirus cases, 14 of which were locally transmitted.

Hong Kong has reported 5,143 cases since the start of the pandemic, which works out to 69 cases per 100,000 people, according to a Times database. Of those cases, 56 were reported in the last seven days, a rate of less than 1 case per 100,000 people. For comparison, the per capita rate in the United States is 2,285 per 100,000.