WUHAN, CHINA -- Secrecy and cronyism at China's top disease control agency led to widespread test shortages and flaws that hampered the early response to the coronavirus outbreak, an Associated Press investigation has found.

China's Center for Disease Control and Prevention gave test kit designs and distribution rights exclusively to three then-obscure Shanghai companies with which officials had personal ties, according to the investigation. It was based on interviews with more than 40 doctors, CDC employees, health experts, and industry insiders, as well as hundreds of internal documents, contracts, messages and emails.

The Shanghai companies -- GeneoDx Biotech, Huirui Biotechnology, and BioGerm Medical Technology -- paid the China CDC for the information and the distribution rights, according to two sources with knowledge of the transaction who asked to remain anonymous to avoid retribution. The price: One million RMB (US$146,600) each, the sources said. It's unclear whether the money went to specific individuals.

In the meantime, the CDC and its parent agency, the National Health Commission, tried to prevent other scientists and organizations from testing for the virus with their own homemade kits. They took control of patient samples and made testing requirements to confirm coronavirus cases much more complicated.

The flawed testing system -- at a time when the virus could have been slowed -- stopped scientists and officials from seeing how fast it was spreading. Chinese authorities failed to report a single new case between Jan. 5 and 17, even as hundreds were infected in Wuhan, the city where the virus was first detected.

The apparent lull in cases meant officials were slow to take early actions such as warning the public or barring large gatherings. It also caused critical shortages of testing kits, barring access to care for many who were infected.

The testing problems, along with other mistakes and delays, allowed the virus to rip through Wuhan undetected and spread across the world in a pandemic that has now sickened 64 million people and killed almost 1.5 million.

China was hardly the only country to grapple with testing. In in the U.S., the CDC declined to use a WHO design and insisted on developing its own kits, which turned out to be faulty and led to even longer delays than in China. Still, the hiccups in China were especially consequential because it was the first country to detect the virus.

"Because you have only three companies providing testing kits, it kept the capacity of testing very limited," said Yanzhong Huang, a senior fellow for global health at the Council on Foreign Relations. "It was a major problem that led to the rapid increase in cases and deaths."

China's foreign ministry and China's top medical agency, the National Health Commission, did not respond to requests for comment.

But interviews and documents suggest that a culture of backdoor connections quietly flourished in a top-down, underfunded public health system. Though none of the first three diagnostics companies tapped to make test kits were well-known in the industry, there were extensive ties between the companies and top China CDC researchers.

The founder of BioGerm, Zhao Baihui, was the former chief technician of the Shanghai CDC's microbiology lab. Emails and financial records obtained by the AP show that Zhao first started BioGerm's predecessor through an intermediary in 2012, while she was still at the Shanghai CDC. In the next five years, she sold thousands of dollars' worth of test kits to her own workplace through the intermediary. After quitting the CDC in 2017, Zhao went on to spearhead lucrative contracts with Shanghai officials.

Zhao did not respond to requests for comment from the AP.

Another of the three companies, GeneoDx, enjoyed special access because it is a subsidiary of the state-run firm SinoPharm, which is managed directly by China's cabinet. In October 2019, GeneoDx co-organized an internal CDC training conference on emerging respiratory diseases in Shanghai. Tan Wenjie, the CDC official who ran the training, was later put in charge of developing test kits.

GeneoDx did not respond to requests for comment or interviews. The National Health Commission did not respond to a request for a comment or an interview with Tan.

The last company, Huirui, is a longtime partner with Tan, the CDC official in charge of test kits. In an interview, CEO Li Hui said the CDC routinely contracted his company to make emergency testing chemicals. He denied any personal relationship with Tan or any payments to the CDC.

"We've been working with the CDC to respond to emerging new diseases for about ten years, not just for a day or two, it's normal," Li said.

It's unclear whether the agreements between the China CDC and the three test kit companies violated Chinese law.

They raise questions around potential violations of bribery laws, along with rules against abuse of authority, self-dealing and conflicts of interest, said James Zimmerman, a Beijing-based corporate attorney and former chairman of the American Chamber of Commerce in China.

But other experts caution that the state may have designated the three companies to make test kits under special laws on the procurement of emergency goods during natural disasters.

"Things will be different in the middle of a crisis," said Lesli Ligorner, a Beijing-based attorney specializing in anti-corruption law. "I wouldn't be so quick to rush to judgement."

The first step in making test kits is to get samples of the virus and decode its genetic sequence. This leads to test designs, essentially a recipe for the tests.

In past outbreaks, the China CDC sent test designs and testing compounds to laboratories across the country just days after identifying the pathogen. But this time, they held back the genome and test designs. Instead, they finalized "technology transfer" agreements to give the test designs to the Shanghai companies, according to three people familiar with the matter. The selection process was kept secret.

At the same time, central CDC authorities stymied others from testing. Provincial CDC staff were told that instead of testing and reporting cases themselves, they had to send patient samples to designated labs in Beijing for full sequencing, a complicated and time-consuming procedure. As a result, for weeks, local CDC staff were unable to confirm new cases.

After a Jan. 14 internal teleconference to order secret preparations for a pandemic, China's health authorities relaxed the requirements to confirm cases and started distributing the CDC-sanctioned test kits. A day after the first test kits finally arrived in Wuhan on Jan. 16, the case count began to rise again.

But the test kits from GeneoDx and Huirui had quality issues, turning out inconclusive results or false negatives. And technicians were hesitant to use test kits that would later prove more accurate from more established companies, because the CDC did not endorse them.

As a result, in the early days, getting a COVID test was so difficult that Wuhan residents compared it to winning the lottery.

Among the victims was Peng Yi, a 39-year-old schoolteacher who started coughing on Jan. 23. When he went to the hospital, he waited for eight hours, only to be turned away for a lack of test kits. Then, when he finally got tested on Jan. 30, it turned out negative, even as the virus ravaged his lungs.

His second test, on Feb. 4, turned out positive. It was too late. Weeks later, Peng passed away.

"There were very, very few tests, basically none -- if you couldn't prove you were positive, you couldn't get admitted to a hospital," his mother, Zhong Hanneng, said in a tearful interview in October. "The doctor said there was nothing that could be done."