BEIJING — Two people in China were diagnosed with plague, setting off a panic on Tuesday about the potential spread of the highly infectious and fatal disease and prompting China’s government to warn citizens to take precautions to protect themselves.

Beijing officials said the two infected people came from Inner Mongolia, a sparsely populated region of northern China. They sought treatment on Tuesday in a hospital in Beijing’s Chaoyang District, where they were diagnosed with pneumonic plague, according to the government office of the district.

The Chinese Center for Disease Control and Prevention said on Weibo, the microblogging site, that there was no need for Beijing residents to panic and that the risks of further transmission are “extremely low.” The authorities quickly isolated the patients, conducted epidemiological investigations on the people who could have been exposed and disinfected all the relevant sites, the CDC said. They have also strengthened monitoring of patients with fever, it added.

Pneumonic plague is one of three types of infectious disease known as plague caused by the same bacterium, Yersinia pestis. Patients diagnosed with pneumonic plague, which causes high fevers and shortness of breath, sometimes first contract the closely related and more well-known disease, bubonic plague.