Beijing (CNN Business) Huawei is facing a growing backlash on social media in China after new details came to light in the case of a former employee who was arrested and jailed for 251 days following an unproven accusation of blackmail from the company.

Prosecutors released the former employee, Li Hongyuan, for insufficient evidence earlier this year but his plight has turned into a PR nightmare for the Chinese tech giant at a time when the trade war means the company is having to lean more heavily on its domestic market.

Huawei hadbecome a rallying point for patriotism in China as tensions with the United States mounted. Growth in its smartphone business has recently been propped up by Chinese shoppers as sales overseas slow.

But the company has been facing outrage since a document circulated on Chinese social media last week showing that Li was awarded government compensation totaling 107,522 yuan (about $15,000) for being wrongfully incarcerated from December 2018 to August 2019. That document, which appeared to be from a district prosecutor's office in Shenzhen, also detailed Li's case against the company.

CNN Business could not verify the authenticity of that document, but an attorney representing Li confirmed details along with the compensation. And a separate document announcing the decision not to indict Li posted online by the same prosecutor's office in August corroborated much of the information, including the circumstances behind Li's departure from Huawei.

"The facts of the crime determined by Shenzhen police are unclear, the evidence is insufficient, and it does not meet the conditions for prosecution," reads the prosecutor's document.

The August filing from the prosecutor states that Li left Huawei in January 2018 and negotiated an exit package. Two months later, a Huawei employee wired 304,742 yuan ($43,000) into his bank account.

Sometime after that, Huawei reported Li to police and accused him of blackmail, saying the money transfer was made in response to Li's attempt to extort the company.

Li was taken into police custody in December 2018 and formally arrested the following month, according to the document, before he was eventually freed in August.

According to the prosecutor's document, police investigators found that Li had "threatened" to expose his department head's "illegal business activities" to government auditors and inspectors and used that to extort the company.

Li's attorneys denied their client had "threatened or coerced" anyone in a statement.

In a statement sent to CNN Business, Li's defense team confirmed that their client was never prosecuted and instead was awarded compensation by the government. They stressed that Li was legally exonerated and highlighted the prosecutor's "objective and fair attitude" during the judicial process.

Huawei did not address the prosecutor's findings that Li was threatening to expose what were described as illegal activities. The company said in a statement to CNN Business on Tuesday that it has "the right, and in fact a duty, to report the facts of any suspected illegal conduct to authorities."

"We respect the decisions made by the authorities," the company added. "If Li Hongyuan believes that he has suffered damages or that his rights have been infringed, we support his right to seek satisfaction through legal means, up to and including lawsuit against Huawei. This is in keeping with the principle of equality before the law."

Lan Rui, one of Li's lawyers, told CNN Business that Li does not plan to sue Huawei.

"This whole episode has burdened Li physically and mentally and now the intense media attention is like rubbing salt into his wound," Lan said.

Li's story first emerged in China just before the one-year anniversary of the arrest in Canada of Meng Wanzhou, Huawei's chief financial officer and daughter of Huawei CEO Ren Zhengfei.

Meng was detained on December 1, 2018, by Canadian police on behalf of Washington for her alleged role in violating US sanctions against Iran. Meng and Huawei deny the charges. She has been barred from leaving Vancouver with a lengthy process of extradition hearings unfolding.

China's state media and many social media users have long been the firmest and loudest supporters of Meng, lashing out at what they describe as a US and Canadian government "plot" to use her as a pawn to thwart Huawei's — and, by extension, China's — growing clout on the global stage.

Washington has alleged that Huawei technology and products could be used as spying tools by China's Communist authorities. Huawei has categorically rejected such claims. It is fighting a federal ban on its products in US courts, while lobbying American allies in Europe and elsewhere on the security of its 5G mobile network technology.

After Li's case came to light, however, many Chinese voices online suddenly turned against Huawei. His case has been a trending topic on Chinese social media in recent days.

In a widely shared commentary, state-run online news outlet The Paper wrote: "If you step on someone's toes on the street, you say sorry; Huawei's action caused a citizen to lose his personal freedom for 251 days, how does it make sense that the company doesn't feel like apologizing?"

"Huawei has lost a huge number of fans because these people now see a different Huawei: a strange monster that has no empathy and has turned into a bully," it added.

Even Meng's plight is now eliciting some negative reactions on the Chinese internet.

In a letter posted online Sunday , Meng detailed the support she had received during her "darkest hour" — including countless internet comments backing her and Huawei — and concluded that "such warmth is the lighthouse that will guide me forward."

"There is a man, similar to your age, also a Chinese citizen, working at the same company as you — he was put behind bars but there was no lighthouse for him," a user named Laonanchai wrote on popular social media platform Zhihu.

"Now come to think of the Meng incident again, it really was karma," said another user named Haiyan Gongzhu.

But some of Huawei's defenders have tried to point to the "isolated" nature of Li's case.

"Writing off Huawei morally based on one case isn't rational," said Hu Xijin, editor-in-chief of popular state-run tabloid Global Times, in a commentary. "Everyone makes mistakes, including the greatest companies."

— Sherisse Pham contributed to this report.