A Chinese doctor who tried to raise the alarm about the new coronavirus before it was even identified was threatened by his government to stop "making false comments." He has since been diagnosed with the illness himself and is being lauded on Chinese social media as a hero for speaking out.

BBC News reports that ophthalmologist Li Wenliang, who works at one of the main hospitals in the epicenter city of Wuhan, noticed a cluster of cases of a flu-like illness near the end of December that appeared to him to be similar to the SARS virus that swept across the world in 2003. He sent a message to fellow clinicians on a group chat warning them to don protective clothing.

BBC News said, just four days later, officials visited him and accused him of having "severely disturbed the social order." They presented him with an official letter, stating: "We solemnly warn you: If you keep being stubborn, with such impertinence, and continue this illegal activity, you will be brought to justice — is that understood?" He signed it.

Get Breaking News Delivered to Your Inbox

A week later he contracted the new coronavirus from a patient he was treating who had glaucoma. He was only diagnosed himself a couple of weeks later, and then on January 30, he posted to China's popular social media app Weibo to confirm he had the virus. That post got thousands of comments, and many Chinese voiced support.

"Dr Li Wenliang is a hero," one person wrote, expressing concern that the government's handling of his honesty could scare other Chinese health professionals. "In the future, doctors will be more afraid to issue early warnings when they find signs of infectious diseases."

The coronavirus has continued to spread worldwide, with more than 20,500 confirmed cases and at least 427 deaths. The vast majority of the infections, and all but two of the deaths, were in mainland China. The World Health Organization has declared a global health emergency.

There were 11 cases confirmed in the U.S. as of Tuesday, including six in California, one in Washington state, one in Arizona, two in Illinois and one in Massachusetts. More than 80 other Americans were being tested for the virus. The U.S. government declared a public health emergency last week and barred foreign nationals from entering the country within two weeks of visiting China unless they are immediate family members of U.S. citizens or permanent residents.

According to the U.S. Centers for Disease Control and Prevention, the new virus can cause symptoms including fever, cough and shortness of breath. Some patients only show mild symptoms and recover, but others have developed life-threatening complications like pneumonia.