Two people in Beijing have been diagnosed with the pneumonic plague - a rare instance of the highly-contagious disease that is fatal if left untreated.

The two individuals were being treated at a central hospital in China's capital city - home to over 21 million inhabitants - on Tuesday, local authorities said.

Pneumonic plague can prove fatal in 24 to 72 hours and is the "most virulent form of plague," according to the World Health Organisation (WHO), while the bubonic form is less dangerous.

The patients are from the northwestern Inner Mongolia province, district officials said in an online statement, adding that the "relevant prevention and control measures have been implemented."

The Beijing government did not respond to AFP's calls for comment, but the WHO confirmed that Chinese authorities had notified them about the plague cases.

"The (Chinese) National Health Commission are implementing efforts to contain and treat the identified cases, and increasing surveillance," said Fabio Scano, coordinator at WHO China.

Scano told AFP that "the risk of transmission of the pulmonary plague is for close contacts and we understand that these are being screened and managed."

According to the WHO website, the lung-based pneumonic plague is very contagious and "can trigger severe epidemics through person-to-person contact via droplets in the air."

Symptoms include fever, chills, vomiting and nausea.

On Weibo, a Twitter-like social media platform, Chinese censors scrubbed the hashtag "Beijing confirms it is treating plague cases" as they tried to control discussions - and panic - around the disease.

"I just want to know how these two came to Beijing??" posted one user. "By train, airplane, or did they drive themselves?"

"Bird flu in the year of the rooster… swine fever in the year of the pig," wrote another. "Next year is the year of the rat…the plague is coming."

The plague germ Yersinia pestis can be transmitted to humans from infected rats via fleas.

In 2014, a man died of the plague in northwestern Gansu province in China and sparked the quarantine of 151 people.

The 30,000 people living in Yumen, the town where the man died, were also prevented from leaving, with police at roadblocks placed on the town perimeter.

According to China's National Health Commission, a total of five people have died from the plague between 2014 and September of this year.

© Agence France-Presse