The U.S. has ordered its consular staff to leave Shanghai, which is under a lockdown to contain a COVID-19 surge.

The State Department said the order is an upgrade from the “authorized” departure issued last week that made the decision voluntary.

The order covers “non-emergency U.S. government employees and their family members from U.S. Consulate General Shanghai."

In this photo released by Xinhua News Agency, the first group of patients who have recovered from COVID-19 leave a makeshift hospital converted from Shanghai Convention & Exhibition Center of International Sourcing in Shanghai on Saturday, April 9, 2022. Shanghai on Sunday discharged over 11,000 recovered COVID-19 patients and health authorities emphasized that they must be allowed to return home despite the lockdown that has severely restricted movement in China's largest city. (Jin LiwangXinhua via AP)

In this photo released by Xinhua News Agency, the first group of patients who have recovered from COVID-19 leave a makeshift hospital converted from Shanghai Convention & Exhibition Center of International Sourcing in Shanghai on Saturday, April 9, 2022. Shanghai on Sunday discharged over 11,000 recovered COVID-19 patients and health authorities emphasized that they must be allowed to return home despite the lockdown that has severely restricted movement in China's largest city. (Jin LiwangXinhua via AP)

In its late Monday announcement, the department said, “Our change in posture reflects our assessment that it is best for our employees and their families to be reduced in number and our operations to be scaled down as we deal with the changing circumstances on the ground."

China responded angrily to the earlier voluntary departure order.

A medical worker conducts COVID-19 tests for residents after a confirmed case was found in the community on Sunday, April 10, 2022, in Shanghai. (AP PhotoChen Si)

A medical worker conducts COVID-19 tests for residents after a confirmed case was found in the community on Sunday, April 10, 2022, in Shanghai. (AP PhotoChen Si)

Workers unload supplies including boxes of masks in Shanghai on Sunday, April 10, 2022. China's largest city of Shanghai will soon begin lifting lockdown in communities that report no positive cases within 14 days after another round of COVID-19 testing, authorities said Saturday. (Chinatopix via AP)

Workers unload supplies including boxes of masks in Shanghai on Sunday, April 10, 2022. China's largest city of Shanghai will soon begin lifting lockdown in communities that report no positive cases within 14 days after another round of COVID-19 testing, authorities said Saturday. (Chinatopix via AP)