A prominent Chinese doctor, who had been punished by police for blowing the whistle on the coronavirus outbreak, has died, the Wuhan Central Hospital reported.

The hospital confirmed Dr. Li Wenliang's death in a post on Weibo, the Chinese version of Twitter: "Ophthalmologist Li Wenliang of our hospital, who was unfortunately infected during the fight against the pneumonia epidemic of the new coronavirus infection, failed after all efforts, and died at 2:58 on February 7, 2020. We deeply regret and mourn this."

Dr. Li Wenliang.

The confirmation from the hospital came after a day of confusion over the fate of Li, who had tried to warn his colleagues about the deadly new respiratory virus in online chat forums.

Two sources had confirmed Li's death Thursday, according to the Global Times, which reported that he had been reprimanded for “posting false information on the Internet,” in the early days of the outbreak.

The World Health Organization also tweeted Thursday that it was "deeply saddened" by Li's death.

In response to a question during a WHO news conference Thursday, Dr. Mike Ryan, head of the agency's Health Emergencies Program, said: “We should celebrate his life and mourn his death with his colleagues."

He added that the organization was “very sad” to hear of Li’s death from the virus.

However, WHO later clarified that it had "no information" about Li's status.

View this graphic on nbcnews.com

Later, the Wuhan Central Hospital, where Li worked and was being treated, initially released a statement on its Weibo social media channel contradicting the reports of his death.

"In the process of fighting the coronavirus, the eye doctor from our hospital Li Wenliang was unfortunately infected. He is now in critical condition and we are doing our best to rescue him," it said. The hospital confirmed his death in a subsequent statement.

Li worked as an ophthalmologist in the city of Wuhan — the epicenter of the outbreak — according to a report in The New York Times earlier this month, which said he and his wife, who have one child, are expecting their second.

He told the newspaper via text message that "it would have been a lot better" if Chinese officials had disclosed information about the epidemic earlier.

"There should be a lot more openness and transparency," he said.

The number of confirmed cases in mainland China reached more than 31,000 as of early Friday, with 636 deaths, China's national health commission said. Nearly 29,000 cases were called "currently confirmed." Some people who have been confirmed have been treated and released.

Two people with the novel coronavirus have died outside mainland China, one in the Philippines and one in Hong Kong, officials said. That brings the total global known deaths to 638. The virus has been confirmed in 24 countries outside of China, according to the World Health Organization.