(Rachel Orr/The Washington Post; iStock)

Wen Tao has been saying what he thinks on China’s booming social-media outlets for the best part of a decade.

His forthright views have won him tens of thousands of followers, but his criticism of the authorities has also come at a cost: He says his social-media accounts have been closed down about 20 times, and he has been bombarded with curses, personal insults and death threats from other social-media users.

China’s Communist Party and its military say they are waging an ideological war against hostile Western ideas on the Internet, and people like Wen are in the firing line.

Through censorship, intimidation and repression, and with the help of an army of “patriotic” netizens, the party appears to be winning.

It is part of China’s larger effort to tame the Internet and to disprove the notion that the flow of ideas across the World Wide Web would be an unstoppable force toward democracy. News and information that might threaten the Communist Party are kept out of the country under a system of censorship known as the Great Firewall, while foreign social-media networks such as Facebook and Twitter that allow private citizens to share ideas and join forces are also banned. Behind the wall, China’s own social-media networks are closely policed to ensure public opinion does not coalesce into a threat to one-party rule.

In February, the government finally banned Wen for good, among a group of Internet users who had supposedly abused their influence, spread rumors and disrupted social order.

Now, he is about ready to give up.

“I am tired,” he said in an interview at a Beijing coffee shop. “The most important thing now is I should lead a happy life with my wife. I want to sleep well.”

Guobin Yang, an associate professor at the University of Pennsylvania and author of many books on China’s Internet, says the online environment has “really changed” in recent years.

“Critical voices are still there, but it is less likely they will coalesce into a broader form of online protest,” he said.

Commuters ride the subway in Beijing. Mobile-device usage and e-commerce are in wide use in the Chinese capital despite serious restrictions on Internet access. (Michael Robinson Chavez/The Washington Post)

Indeed, social media is increasingly being harnessed by autocratic regimes to bolster their rule, says University of Toronto political scientist Seva Gunitsky. It helps dictatorships gauge public opinion and discover otherwise hidden grievances, while also allowing them to disseminate propaganda and shape the contours of public debate.

“China has been at the forefront of this, and they are quickly getting very sophisticated about it,” he said. “Social media can allow autocrats to become stronger, more informed and more adaptable. As with radio and television before it, social media is not just a way to spread information but a potential tool of subtle control and ma­nipu­la­tion — one that often works more effectively than brute-force suppression.”

In a refinement of traditional Communist Party propaganda, the core of the attempt to tame social media since 2008 has been to “channel” public opinion into narratives that suit the party and divert attention away from controversy, says David Bandurski at the University of Hong Kong’s China Media Project.

Censors work selectively, especially targeting posts that threaten to spur some form of collective action. Pro-government voices generally do not engage critics in discussion or argument — that would draw too much attention to controversial subjects — but do often subject them to personal attack.

The war was effectively declared in earnest in July 2011, after a high-speed train crash in Wenzhou in eastern China, when news and outrage spread over Chinese social media and the party felt it had lost control of the narrative, experts say.

In October of that year, the party’s top leadership vowed to “seize the commanding heights” of the Internet and has steadily rolled out a series of measures to do just that — a campaign that has only intensified since Xi Jinping became president in 2013.

Early targets: the influential commentators, known as Big V’s (V stands for verified account), who enjoyed millions of fans and huge influence. In 2013, Charles Xue, an American venture capitalist of Chinese origin and a leading liberal blogger, was arrested for having sex with a prostitute and forced to make a humiliating televised confession — for being puffed up with vanity and behaving like he was “emperor of the Internet.” State news agency Xinhua said a warning bell had been sounded to all Big V’s.

Ordinary citizens, meanwhile, were warned off with a threat of up to three years in jail for spreading rumors if their posts were viewed more than 5,000 times or reposted 500 times.

Real-name verification was introduced for social-media accounts, while the government warned Internet giant Sina last year to intensify its own censorship of online comments on its popular Weibo microblogging site — or have it closed down.

Broadening the campaign, China’s Internet regulator told news websites on June 21 to crack down on online comment sections, cleaning up comments that violated what are described as “nine don’ts and seven bottom lines,” including endangering state security, challenging socialism and inciting ethnic hatred.

Ren Xianliang, deputy director of the Cyberspace Administration of China, addressed editors in a national videoconference, urging them to make it easier for people to supervise one another by reporting “harmful” comments and asking websites to promote positive comments to foster a “healthy and well-intentioned” online culture.

The Communist Party’s own Internet army is at the forefront of these efforts.

Some posters are popularly believed to be paid — the ­“wumao” (the 50-cent Party) who are supposedly given half a renminbi ($0.08) for every post praising the government or denigrating its critics.

But a much larger number may just be employees of the state, doing part-time work outside their main jobs to support the party’s agenda.

Various arms of the Chinese government, together with individual state employees, by their own admission operate more than 150,000 official Weibo accounts, but the real number of accounts run by state employees could be far higher.

A study released in May by Harvard University’s Gary King, Stanford University’s Jennifer Pan and the University of California at San Diego’s Margaret Roberts suggests that government-directed accounts generate nearly 450 million posts a year, with intense bursts of “cheerleading” or “distraction” around specific events or at sensitive times.

Others are volunteers, reportedly recruited by the Communist Youth League in the millions to spread “positive energy” and “civilize” the Internet. They are nicknamed the “Bring-your-own-grainers” because they supposedly work for free.

Some might just be ordinary Chinese netizens who say they are tired of people putting their country down.

“Public intellectuals are too eager to spread anything negative regardless of its factual accuracy,” one pro-party microblogger said in an online interview. “They oppose the government and the system regardless. They are not objective or fair, that’s why people dislike them.”

True believers could come from a new breed of young people, brought up after the 1989 Tiananmen Square protests, who are proud of China’s rising global power and suspicious of Western criticism as an attempt to block its rise. They cast themselves as “patriots,” tapping into the party’s nationalist narrative.

“The rise of China gave them a lot of confidence,” the microblogger explained, saying it was “not convenient” to give his real name because he did not want trouble.

Experts say the participation of these various pro-party groups has transformed China’s social-media environment.

On the other side, prominent critics of the government might be blocked, insulted or accused by their fellow netizens of spreading rumors — a charge that now has legal bite.

Yang, the University of Pennsylvania professor, calls it a form of “psychological war” but also a harking back to the early days of Communist China, when the masses were mobilized to support major new government policy directives.

“It’s a Maoist-era strategy revived in new technological conditions,” he said.

In the heady days of “Twitter revolutions,” it was supposed to be impossible to put the genie of public opinion back in the bottle, once the Internet and social media had let it out. But China’s Communist Party has made a determined effort to do just that.

In its annual “Public Opinion Report” for 2015, the People’s Daily Online reported a “major increase in consensus online” in support of the party, with millions of “young cyber civilization volunteers” emerging as the most prominent force.

“Due to the strengthened management of online platforms, netizens showed an increased sense of self-discipline,” it said. “The heat of public opinion continues to drop.”

The Big V’s, it reported, no longer have so many followers, and their opinions are less widely reposted. Whereas the Wenzhou train crash attracted 500 million Weibo posts in 2011, the 2014 crash of Malaysia Airlines Flight 370 attracted just 25 million. Last year’s sinking of a cruise ship on the Yangtze River also generated a relatively muted reaction online.

President Xi says he wants an Internet that is “clear and bright” but in April told leaders of the country’s top Internet companies, as well as officials and academics, that he did not want to shut down criticism entirely.

Indeed, he called for “more tolerance and patience” toward netizens and said he welcomed online criticism “whether mild or fierce,” as long as it arises from goodwill, the People’s Daily reported.

Authorities then apparently censored negative reactions to his speech on social media.

Blogger Wen, a 43-year-old former reporter, says he has found official tolerance in extremely short supply.

In 2011, shortly after making a documentary on artist and dissident Ai Weiwei, he says he was taken away by police and held in a hotel room for 83 days, one hand constantly chained to a chair. He says he was never charged with any crime nor given any written record of his detention.

In similar fashion, he says he has now been banned from the Internet without any formal notification of what he had done wrong.

“I am not a fighter; I am not an activist. I am not commenting on behalf of any organization. All my words are my own,” he said. “I just want freedom of speech without fear.”

Xu Yangjingjing contributed to this report.