Police cars wait as officers stand guard outside a court in the southern Chinese city of Guangzhou on Jan. 29, 2016. (Reuters)

In China, allegations of police torture are the stuff of everyday life. But to the country’s growing middle class, the reports long remained remote — a scandal affecting mostly protesters, activists and, occasionally, Communist Party cadres accused of corruption.

That perspective shifted after the death in police custody last May of Lei Yang, a 29-year-old environmental researcher, and a recent decision not to prosecute the officers involved, despite evidence of a coverup. The case has sparked a rare show of anger from other middle-class urban professionals and fueled anxiety about a capricious legal system that many now fear can ensnare almost anyone.

“The Lei Yang case has completely destroyed the middle class’s trust in the government’s commitment to rule of law — and its sincerity,” said Li Shu, a partner at the Anli Partners law firm in Beijing.

The death of Lei, who worked for a state-backed environmental organization in Beijing and was a graduate of the prestigious Renmin University of China, sparked a social-media outcry at the time and a call from President Xi Jinping to improve police conduct. But the decision not to charge the police officers involved, announced Dec. 23, has reopened the controversy.

Thousands of alumni of Renmin and other top universities have signed petitions asking for criminal charges to be reinstated, while lawyers, academics and business executives have defied censors to speak out publicly on the matter.

“For Chinese people who think critically, when they saw the result of this case, they can see the authorities’ stubbornness and evil,” said Yu Li, a signatory and Renmin graduate who works in the IT industry. “If a human being doesn’t even have the most basic right — the right to life — and the country doesn’t protect that right, why can’t we use the word ‘evil’ to describe such a country?”

Lei’s family says he left home on the evening of May 7 to pick up relatives from the airport. The police say he was caught soon afterward in a raid on a massage parlor by plainclothes officers, adding that they have proof he paid for sexual services. They initially claimed he fell unconscious after repeatedly and violently resisting arrest, then died of a heart attack.

But the story soon seemed to fall apart. Family members, in a statement released online, said that his body, which they saw at the police station, was bloodied and bore severe bruising on the head and legs. Internet commenters ridiculed police claims that Lei, in his struggle, had smashed the camera or cellphone they used to record the arrest and that the closed-circuit television cameras in the neighborhood were broken.

Then an autopsy, performed as part of an investigation by prosecutors, found that Lei had not suffered a heart attack but had choked to death on his own vomit.

In their Dec. 23 report, prosecutors concluded that the officers had “exceeded reasonable limits” in trying to subdue Lei, had failed to give him emergency medical aid or take him to a hospital promptly and later “deliberately fabricated facts, concealed the truth and obstructed the investigation.”

But after two officers were arrested for dereliction of duty, prosecutors declined to press charges — on the grounds that the offenses were “minor,” Lei had resisted arrest, and the officers had “admitted their crime and showed repentance.”

As the news broke, censors stepped in. Websites and social-media apps were instructed to strictly control comments on the case, while searches for “Lei Yang case” were blocked on Sina Weibo, China’s equivalent of Twitter, according to the China Digital Times website. Hundreds of Weibo posts were deleted by censors. Hong Kong University’s Weiboscope censorship index — measuring the proportion of published posts that later vanish — reached a three-month high.

Still, outrage spread. An open letter from Renmin alumni has attracted some 2,400 signatures, while another from alumni of other universities has garnered 1,000 signatures, organizers say. Dozens of groups have sprung up on the WeChat social-messaging app to share legal opinions, news and essays, while leading lawyers offered to represent the family if they chose to sue.

Li said the case marked a rare instance of agreement in the legal community that a decision by prosecutors was “untenable.”

On Thursday, Beijing police announced that the most senior officer involved had been dismissed and that another officer had been transferred. Three contractors were let go.

According to human rights groups, torture in police custody is common in China, notably affecting political dissidents, party members who have fallen out of favor and poorer members of society protesting perceived injustices. Lawyers advocating for those with complaints against the system, including farmers and migrant workers, have been rounded up and accused of being part of a foreign plot to destabilize the government.

But none of that seems to have resonated with the middle class, or even with the wider legal community, as this case has done.

“If similar cases happen in rural areas, there won’t be a reaction,” said Zhang Wen, a social commentator. “But many people are just like Lei Yang. If it could happen to him, why couldn’t it happen to them?”

The Communist Party relies heavily on the police to enforce order and maintain social stability, and many officers are poorly paid. Authorities apparently decided to ride out the storm of public outrage and stand by the police rather than risk losing their support and provoking an even more serious law-and-order crisis, legal experts said.

Wu Qiang, a former Tsinghua University professor who helped draw up a petition after Lei died, said he was hoping to harness popular dissatisfaction into a wider movement aimed at winning protections for civil rights and curbing police powers. He likened it to the movement that led to the 1989 Tiananmen Square pro-democracy demonstrations — albeit with more limited goals.

“We received high-level education and graduated from good universities,” he said. “Of course we need to stand up. This sense of mission is the same as the students who walked into Tiananmen Square. However, this time our aim is lower.”

Frustrations among Chinese were sharpened last year by a stock market crash, widely seen as badly handled by authorities. Meanwhile, concerns about poisonous air, adulterated food and an ultracompetitive education system loom large in many people’s lives. Increasingly, those who can are sending their children or some of their money abroad.

But it would be wrong to expect a middle-class uprising, said ­David Goodman, head of China studies at Xi’an Jiaotong-
Liverpool University in Suzhou.

“In simple terms, that’s because the middle class is largely embedded in the party-state,” he said. “Most owe their power, prestige and wealth to their position in the party-state.”

Many middle-class Chinese people work in the state sector or use their party contacts to conduct profitable private business; they also fear what might happen if the system collapsed.

“When people protest, what most of them want is not to end the party-state but for the party-state to function more effectively,” Goodman said.

Lei’s parents, meanwhile, have abandoned plans to sue the police because of pressure, according to their lawyer, Chen Youxi.

“It is beyond what we, especially two old people, can take,” Chen said they told him.

Jin Xin contributed to this report.