BEIJING (AP) — China says it is temporarily barring most foreigners from entering the country as it seeks to curb the number of imported coronavirus cases.

The foreign ministry announced late Thursday that even foreign citizens with residence permits will be prevented from entering starting on Saturday. All visa-free transit policies will also be temporarily suspended.

It said diplomatic workers will be exempt, and foreign citizens coming to China for “necessary economic, trade, scientific or technological activities or out of emergency humanitarian needs” can still apply for visas.

The ministry said in a statement that: “The suspension is a temporary measure that China is compelled to take in light of the outbreak situation and the practices of other countries.”

The coronavirus outbreak originated in China. But as its number of domestic virus cases has dwindled, the country has had to contend with infections brought by people who have recently arrived from overseas. Such infections have accounted for the majority of China’s new cases for more than a week.

More on COVID-19

Do you have questions about the coronavirus that causes COVID-19?

Ask in the form below and we'll dig for answers. If you're using a mobile device and can't see the form on this page, ask your question here. If you have specific medical questions, please contact your doctor.

How is the pandemic affecting you?

What has changed about your daily life? What kinds of discussions are you having with family members and friends? Are you a health care worker who's on the front lines of the response? Are you a COVID-19 patient or do you know one? Whoever you are, we want to hear from you so our news coverage is as complete, accurate and useful as possible. If you're using a mobile device and can't see the form on this page, click here.