The doctor who tried to warn colleagues about the new coronavirus during the outbreak's early stages in Wuhan has died after contracting the illness.

Doctor Li Wenliang had posted his concerns in an online chat group in late December.

He was later reportedly forced by police to sign a statement admitting to "illegal behaviour" for allegedly "spreading rumours" about the seriousness of the virus.

Li, 34, was an ophthalmologist at Wuhan Central Hospital which is at the centre of the outbreak. In a social media post the hospital says Li was "unfortunately infected during the fight against the pneumonia epidemic of the new coronavirus infection," according to the Associated Press. "We deeply regret and mourn this," it added.

The Associated Press says that over 28,000 people have now been infected by coronavirus and 560 have died.

The New York Times says that Li was one of many medical professionals in Wuhan who tried to warn the medical community and others about the virus when the government did not. Many health professionals have wondered if they spread could have been prevented had the Chinese government allowed more transparency in late December and early January.