HANGZHOU, China — Sitting inside a Wuhan police station last Saturday night, Fang Bin was sure he would end up in a jail cell.

Earlier that day, Fang had visited a Wuhan hospital overwhelmed with coronavirus cases and filmed a short video showing corpses in body bags piled up. It quickly went viral. Now, as Fang sat in an interrogation room, seven furious security officials were railing about his “negativity” on social media.

“They said: ‘You detonated a nuclear bomb. Instead of showing the positive side, you show dead bodies!’ ” Fang recalled. He said the officers vowed to charge him with political crimes.

But as midnight approached — two hours after Fang alerted his social media followers that he had been detained — the officials did the unexpected: They released him. Fang said he thinks it was thanks to popular pressure.

“They got a phone call — possibly their superiors saying the world was watching,” Fang said. “Their attitude suddenly changed.”

As the coronavirus outbreak has upended Chinese government and society in recent weeks, it has put two typically all-powerful organs — the government’s censors and the security forces — on the defensive.

Citizen bloggers, dissidents and gadflies who post criticism or negative news of the government are being spared tough punishment that authorities might have otherwise meted out in ordinary times. Meanwhile, the country’s dwindling ranks of independent-minded journalists are also enjoying an unusual level of freedom to aggressively report in the outbreak’s epicenter — at least for now.

Seven years into the increasingly authoritarian rule of President Xi Jinping, China is seeing a brief flash of public discourse and dissent as the government tries to soothe an enraged and confused population.

During national crises such as the 2008 earthquake in Sichuan province, when the Chinese public blamed the soaring death toll on poor government oversight and the international spotlight was trained on Beijing, the ruling Communist Party also allowed a window of “managed transparency,” said Maria Repnikova, a Georgia State University professor who studies censorship and propaganda in China and Russia.

It’s a pattern, Repnikova said, because “crises also create such turmoil at all levels of politics and society” that censors err on the side of caution.

“Authorities have to ‘wait and see,’ ” she said.

Chinese authorities have been off balance ever since news emerged last month that eight doctors in Wuhan had tried to spread word about the coronavirus early on but were silenced by police. In the weeks since, even the country’s high court publicly chided the police for abusing their power, and the influential state broadcaster on Thursday called for stronger whistleblower protections.

As a quarantine was suddenly imposed over Wuhan in the final week of January, the nation was gripped by any videos or news coming out of the city — circumstances that generated large audiences for the likes of Fang, the video blogger in Wuhan.

Fang said he believes he was spared the night he was detained thanks to public fascination with his videos.

Officials who interrogated him vowed to produce evidence that he was being funded by “hostile foreign forces” — raising the prospect of grave state security charges, he recalled. But while he was detained, users on WeChat quickly spread news about his arrest. On Twitter, his supporters publicized the phone number of the police station where Fang was held, hoping to pressure officials by bombarding them with questions about his whereabouts.

After a few hours, the police let Fang go.

A similar situation unfolded in Huanggang, a city adjacent to Wuhan that also has been ravaged by the coronavirus.

A week ago, Huanggang resident Gao Fei wrote on Twitter that local Red Cross officials told him they were facing a severe shortage of supplies. He added a rebuke toward Xi and a plea for foreign governments to impose sanctions on the Communist Party leadership.

That landed him in a week-long detention.

Hours after his release Thursday, Gao told The Washington Post that he got off lightly. Even the police seemed to sympathize with him, he said.

“When I was inside, the police said, ‘People outside are asking about you,’ ” he said. “It’s very possible they could have kept me longer than they did. Maybe a higher-up’s hands went soft.”

While Chinese Internet users have followed the posts of Fang, Gao and other amateur reporters inside locked-down Hubei province, they also have been digesting a slew of hard-hitting and plucky reports by the country’s fading journalism industry.

In recent weeks, investigative-minded outlets such as Caixin and Caijing have detailed the haphazard public health response by officials in Wuhan at the center of the outbreak and scored damning interviews with anonymous insiders. Sanlian Zhoukan, or Life Week, published reports describing how doctors in Wuhan lacked supplies, as well as an economic analysis of the epidemic’s toll on China’s economy.

After Sanlian Zhoukan’s social media account was suspended last week, it simply started a new one a few days later. Propaganda officials never forced it to stop publication.

One journalist at Caixin, which has produced a series of accountability reports citing interviews with Wuhan’s doctors and public health officials, said the outlet and its reporters have been warned by the government about activity on social media. But central propaganda authorities otherwise have not interfered with its newsgathering or publishing in recent weeks, said the staffer, who spoke on the condition of anonymity to discuss sensitive internal matters.

“The basic narrative that Chinese journalism is dead was accepted as fact before this outbreak,” said Yuan Zeng, who studies media in China at the University of Leeds. “But it’s been surprising to see the space allowed for this wave of investigative reporting.”

In times of severe crisis, the government can rely on relatively unfettered social media and independent reporting to gather information about developments on the ground or public sentiment, Zeng said. But she predicted that in the coming days and weeks, the government will begin to tighten censorship controls again, settle scores with outspoken dissidents and produce a flood of upbeat propaganda as it comes to grips with the epidemic.

“The cycle ends with state mouthpieces orchestrating praise for the party, its handling of the crisis and the bravery of the Chinese people,” she said. “We’re already entering that part of the curve.”

On Tuesday, a day after Xi chaired a high-level political meeting, a brief notice in state media disclosed that central propaganda department officials were preparing to “deploy” 300 state media reporters to Wuhan, using a Chinese word usually used to describe the mustering of military forces.

Xi ordered “propaganda, education and opinion guidance work to be done well,” the notice quoted a top propaganda official as telling his department.

Fang, the Wuhan video blogger, said he went into the hospitals in January precisely because he did not trust the upbeat images being shown in state media about the government’s handling of the epidemic.

“Central television, Hubei television, Wuhan television — none of them were going to where the real story was,” he said. “I thought there was a real story that everybody needed to know, so I’d do it myself.”

After a posting several less sensational videos from Wuhan, Fang hit Internet gold Saturday when he surreptitiously held his smartphone as he walked around Wuhan No. 5 Hospital. He first peered into a van where filled body bags were stacked, then walked into a hospital room where a doctor proclaimed a man beyond saving. Fang walked out as medics brought in more patients who were possibly already deceased.

“Eight bodies in five minutes,” the clip quickly became titled on social media.

Fang, 57, who produces traditional Chinese clothing called hanfu, said video muckraking was a side hobby long before the virus outbreak.

In 2013, he shot videos of people who were punished inside China’s “black jails” — undisclosed sites that are often converted apartments or offices — for political offenses. When he posted the video, he received a 60-day stint in a black jail himself.

Today, Fang is hoping to go back onto Wuhan’s streets to shoot, he said. But he has been holed up at home since state security officials reappeared at his doorstep Tuesday and asked him to come with them.

They left after Fang dared them to break his door to seize him. It would make even more explosive content that he could post online, he told them.

“It would be a stupid thing for them to do, because the world thinks I’m in the right,” he declared by telephone as he waited Thursday for the police to return. “I’m full of confidence right now. I don’t feel fear.”