In December 2015, thousands of tech entrepreneurs and analysts, along with a few international heads of state, gathered in Wuzhen, in southern China, for the country’s second World Internet Conference. At the opening ceremony the Chinese president, Xi Jinping, set out his vision for the future of China’s internet. “We should respect the right of individual countries to independently choose their own path of cyber-development,” said Xi, warning against foreign interference “in other countries’ internal affairs”.

No one was surprised by what they heard. Xi had already established that the Chinese internet would be a world unto itself, with its content closely monitored and managed by the Communist party. In recent years, the Chinese leadership has devoted more and more resources to controlling content online. Government policies have contributed to a dramatic fall in the number of postings on the Chinese blogging platform Sina Weibo (similar to Twitter), and have silenced many of China’s most important voices advocating reform and opening up the internet.

It wasn’t always like this. In the years before Xi became president in 2012, the internet had begun to afford the Chinese people an unprecedented level of transparency and power to communicate. Popular bloggers, some of whom advocated bold social and political reforms, commanded tens of millions of followers. Chinese citizens used virtual private networks (VPNs) to access blocked websites. Citizens banded together online to hold authorities accountable for their actions, through virtual petitions and organising physical protests. In 2010, a survey of 300 Chinese officials revealed that 70% were anxious about whether mistakes or details about their private life might be leaked online. Of the almost 6,000 Chinese citizens also surveyed, 88% believed it was good for officials to feel this anxiety.

For Xi Jinping, however, there is no distinction between the virtual world and the real world: both should reflect the same political values, ideals, and standards. To this end, the government has invested in technological upgrades to monitor and censor content. It has passed new laws on acceptable content, and aggressively punished those who defy the new restrictions. Under Xi, foreign content providers have found their access to China shrinking. They are being pushed out by both Xi’s ideological war and his desire that Chinese companies dominate the country’s rapidly growing online economy.

At home, Xi paints the west’s version of the internet, which prioritises freedom of information flow, as anathema to the values of the Chinese government. Abroad, he asserts China’s sovereign right to determine what constitutes harmful content. Rather than acknowledging that efforts to control the internet are a source of embarrassment – a sign of potential authoritarian fragility – Xi is trying to turn his vision of a “Chinanet” (to use blogger Michael Anti’s phrase) into a model for other countries.

The challenge for China’s leadership is to maintain what it perceives as the benefits of the internet – advancing commerce and innovation – without letting technology accelerate political change. To maintain his “Chinanet”, Xi seems willing to accept the costs in terms of economic development, creative expression, government credibility, and the development of civil society. But the internet continues to serve as a powerful tool for citizens seeking to advance social change and human rights. The game of cat-and-mouse continues, and there are many more mice than cats.

The very first email in China was sent in September 1987 – 16 years after Ray Tomlinson sent the first email in the US. It broadcast a triumphal message: “Across the Great Wall we can reach every corner in the world.” For the first few years, the government reserved the internet for academics and officials. Then, in 1995, it was opened to the general public. In 1996, although only about 150,000 Chinese people were connected to the internet, the government deemed it the “Year of the Internet”, and internet clubs and cafes appeared all over China’s largest cities.

Yet as enthusiastically as the government proclaimed its support for the internet, it also took steps to control it. Rogier Creemers, a China expert at Oxford University, has noted that “As the internet became a publicly accessible information and communication platform, there was no debate about whether it should fall under government supervision – only about how such control would be implemented in practice.” By 1997, Beijing had enacted its first laws criminalising online postings that it believed were designed to hurt national security or the interests of the state.

China’s leaders were right to be worried. Their citizens quickly realised the political potential inherent in the internet. In 1998, a 30-year-old software engineer called Lin Hai forwarded 30,000 Chinese email addresses to a US-based pro-democracy magazine. Lin was arrested, tried and ultimately sent to prison in the country’s first known trial for a political violation committed completely online. The following year, the spiritual organisation Falun Gong used email and mobile phones to organise a silent demonstration of more than 10,000 followers around the Communist party’s central compound, Zhongnanhai, to protest their inability to practise freely. The gathering, which had been arranged without the knowledge of the government, precipitated an ongoing persecution of Falun Gong practitioners and a new determination to exercise control over the internet.

The man who emerged to lead the government’s technological efforts was Fang Binxing. In the late 1990s, Fang worked on developing the “Golden Shield” – transformative software that enabled the government to inspect any data being received or sent, and to block destination IP addresses and domain names. His work was rewarded by a swift political rise. By the 2000s, he had earned the moniker “Father of the Great Firewall” and, eventually, the enmity of hundreds of thousands of Chinese web users.

Facebook Twitter Pinterest Security outside Google’s office in Beijing in January 2010. Photograph: Diego Azubel/EPA

Throughout the early 2000s, the Chinese leadership supplemented Fang’s technology with a set of new regulations designed to ensure that anyone with access to China’s internet played by Chinese rules. In September 2000, the state council issued order no 292, which required internet service providers to ensure that the information sent out on their services adhered to the law, and that some domain names and IP addresses were recorded. Two years later, Beijing blocked Google for the first time. (A few years later, Google introduced Google.cn, a censored version of the site.) In 2002, the government increased its emphasis on self-censorship with the Public Pledge on Self-Discipline for China’s Internet Industry, which established four principles: patriotic observance of law, equitableness, trustworthiness and honesty. More than 100 companies, including Yahoo!, signed the pledge.

Perhaps the most significant development, however, was a 2004 guideline on internet censorship that called for Chinese universities to recruit internet commentators who could guide online discussions in politically acceptable directions and report comments that did not follow Chinese law. These commentators became known as wu mao dang, or “50-cent party”, after the small bonuses they were supposedly paid for each post.

Yet even as the government was striving to limit individuals’ access to information, many citizens were making significant inroads into the country’s political world – and their primary target was corrupt local officials.

In May 2009, Deng Yujiao, a young woman working in a hotel in Hubei province, stabbed a party official to death after she rejected his efforts to pay her for sex and he tried to rape her. Police initially committed Deng to a mental hospital. A popular blogger, Wu Gan, however, publicised her case. Using information gathered through a process known as ren rou sousuo, or “human flesh search engine”, in which web users collaborate to discover the identity of a specific individual or organisation, Wu wrote a blog describing the events and actions of the party officials involved.

In an interview with the Atlantic magazine at the time, he commented: “The cultural significance of flesh searches is this: in an undemocratic country, the people have limited means to get information … [but] citizens can get access to information through the internet, exposing lies and the truth.” Deng’s case began to attract public support, with young people gathering in Beijing with signs reading “Anyone could be Deng Yujiao.” Eventually the court ruled that Deng had acted in self-defence.

China blocks HBO after John Oliver parody of Xi Jinping Read more

During this period, in the final years of Hu Jintao’s presidency, the internet was becoming more and more powerful as a mechanism by which Chinese citizens held their officials to account. Most cases were like that of Deng Yujiao – lodged and resolved at the local level. A small number, however, reached central authorities in Beijing. On 23 July 2011, a high-speed train derailed in the coastal city of Wenzhou, leaving at least 40 people dead and 172 injured. In the wake of the accident, Chinese officials banned journalists from investigating, telling them to use only information “released from authorities”. But local residents took photos of the wreckage being buried instead of being examined for evidence. The photos went viral and heightened the impression that the government’s main goal was not to seek the true cause of the accident.

A Sina Weibo poll – later blocked – asked users why they thought the train wreckage was buried: 98% (61,382) believed it represented destruction of evidence. Dark humour spread online: “How far are we from heaven? Only a train ticket away,” and “The Ministry of Railways earnestly requests that you ride the Heavenly Party Express.” The popular pressure resulted in a full-scale investigation of the crash, and in late December, the government issued a report blaming poorly designed signal equipment and insufficient safety procedures. As many as 54 officials faced disciplinary action as a result of the crash.

The internet also provided a new sense of community for Chinese citizens, who mostly lacked robust civil-society organisations. In July 2012, devastating floods in Beijing led to the evacuation of more than 65,000 residents and the deaths of at least 77 people. Damages totalled an estimated $1.9bn. Local officials failed to respond effectively: police officers allegedly kept ticketing stranded cars instead of assisting residents, and the early warning system did not work. Yet the real story was the extraordinary outpouring of assistance from Beijing web users, who volunteered their homes and food to stranded citizens. In a span of just 24 hours, an estimated 8.8m messages were sent on Weibo regarding the floods. The story of the floods became not only one of government incompetence, but also one of how an online community could transform into a real one.

While the Chinese people explored new ways to use the internet, the leadership also began to develop a taste for the new powers it offered, such as a better understanding of citizens’ concerns and new ways to shape public opinion. Yet as the internet increasingly became a vehicle for dissent, concern within the leadership mounted that it might be used to mobilise a large-scale political protest capable of threatening the central government. The government responded with a stream of technological fixes and political directives; yet the boundaries of internet life continued to expand.

The advent of Xi Jinping in 2012 brought a new determination to move beyond deleting posts and passing regulations. Beijing wanted to ensure that internet content more actively served the interests of the Communist party. Within the virtual world, as in the real world, the party moved to silence dissenting voices, to mobilise party members in support of its values, and to prevent foreign ideas from seeping into Chinese political and social life. In a leaked speech in August 2013, Xi articulated a dark vision: “The internet has become the main battlefield for the public opinion struggle.”

Early in his tenure, Xi embraced the world of social media. One Weibo group, called Fan Group to Learn from Xi, appeared in late 2012, much to the delight of Chinese propaganda officials. (Many Chinese suspected that the account was directed by someone in the government, although the account’s owner denied it.) Xi allowed a visit he made to Hebei to be liveblogged on Weibo by government-affiliated press, and videos about Xi, including a viral music video called How Should I Address You, based on a trip he made to a mountain village, demonstrate the government’s increasing skill at digital propaganda.

Facebook Twitter Pinterest Xi Jinping at the World Internet Conference in Jiaxing, China, in 2015. Photograph: Aly Song/Reuters

Under Xi, the government has also developed new technology that has enabled it to exert far greater control over the internet. In January 2015, the government blocked many of the VPNs that citizens had used to circumvent the Great Firewall. This was surprising to many outside observers, who had believed that VPNs were too useful to the Chinese economy – supporting multinationals, banks and retailers, among others – for the government to crack down on them.

In spring 2015, Beijing launched the Great Cannon. Unlike the Great Firewall, which has the capacity to block traffic as it enters or exits China, the Great Cannon is able to adjust and replace content as it travels around the internet. One of its first targets was the US coding and software development site GitHub. The Chinese government used the Great Cannon to levy a distributed denial of service attack against the site, overwhelming it with traffic redirected from Baidu (a search engine similar to Google). The attack focused on attempting to force GitHub to remove pages linked to the Chinese-language edition of the New York Times and GreatFire.org, a popular VPN that helps people circumvent Chinese internet censorship.

But perhaps Xi’s most noticeable gambit has been to constrain the nature of the content available online. In August 2013, the government issued a new set of regulations known as the “seven baselines”. The reaction by Chinese internet companies was immediate. Sina, for example, shut down or “handled” 100,000 Weibo accounts found to not comply with the new rules.

The government also adopted tough restrictions on internet-based rumours. In September 2013, the supreme people’s court ruled that authors of online posts that deliberately spread rumours or lies, and were either seen by more than 5,000 individuals or shared more than 500 times, could face defamation charges and up to three years in jail. Following massive flooding in Hebei province in July 2016, for example, the government detained three individuals accused of spreading “false news” via social media regarding the death toll and cause of the flood. Some social media posts and photos of the flooding, particularly of drowning victims, were also censored.

In addition, Xi’s government began targeting individuals with large social media followings who might challenge the authority of the Communist party. Restrictions on the most prominent Chinese web influencers, beginning in 2013, represented an important turning point in China’s internet life. Discussions began to move away from politics to personal and less sensitive issues. The impact on Sina Weibo was dramatic. According to a study of 1.6 million Weibo users, the number of Weibo posts fell by 70% between 2011 and 2013.

The strength of the Communist party’s control over the internet rests above all on its commitment to prevent the spread of information that it finds dangerous. It has also adopted sophisticated technology, such as the Great Firewall and the Golden Shield. Perhaps its most potent source of influence, however, is the cyber-army it has developed to implement its policies.

The total number of people employed to monitor opinion and censor content on the internet – a role euphemistically known as “internet public opinion analyst” – was estimated at 2 million in 2013. They are employed across government propaganda departments, private corporations and news outlets. One 2016 Harvard study estimated that the Chinese government fabricates and posts approximately 448m comments on social media annually. A considerable amount of censorship is conducted through the manual deletion of posts, and an estimated 100,000 people are employed by both the government and private companies to do just this.

Private companies also play an important role in facilitating internet censorship in China. Since commercial internet providers are so involved in censoring the sites that they host, internet scholar Guobin Yang argues that “it may not be too much of a stretch to talk about the privatisation of internet content control”. The process is made simpler by the fact that several major technology entrepreneurs also hold political office. For example, Robin Li of Baidu is a member of the Chinese People’s Political Consultative Conference, an advisory legislature, while Lei Jun, founder and CEO of mobile phone giant Xiaomi, is a representative of the National People’s Congress.

Yet Xi’s growing control over the internet does not come without costs. An internet that does not work efficiently or limits access to information impedes economic growth. China’s internet is notoriously unreliable, and ranks 91st in the world for speed. As New Yorker writer Evan Osnos asked in discussing the transformation of the Chinese internet during Xi’s tenure: “How many countries in 2015 have an internet connection to the world that is worse than it was a year ago?”

Scientific innovation, particularly prized by the Chinese leadership, may also be at risk. After the VPN crackdown, a Chinese biologist published an essay that became popular on social media, entitled Why Do Scientists Need Google? He wrote: “If a country wants to make this many scientists take out time from the short duration of their professional lives to research technology for climbing over the Great Firewall and to install and to continually upgrade every kind of software for routers, computers, tablets and mobile devices, no matter that this behaviour wastes a great amount of time; it is all completely ridiculous.”

‘Is this what the west is really like?’ How it felt to leave China for Britain | Xiaolu Guo Read more

More difficult to gauge is the cost the Chinese leadership incurs to its credibility. Web users criticising the Great Firewall have used puns to mock China’s censorship system. Playing off the fact that the phrases “strong nation” and “wall nation” share a phonetic pronunciation in Chinese (qiangguo), some began using the phrase “wall nation” to refer to China. Those responsible for seeking to control content have also been widely mocked. When Fang opened an account on Sina Weibo in December 2010, he quickly closed the account after thousands of online users left “expletive-laden messages” accusing him of being a government hack. Censors at Sina Weibo blocked “Fang Binxing” as a search term; one Twitter user wrote: “Kind of poetic, really, the blocker, blocked.” When Fang delivered a speech at Wuhan University in central China in 2011, a few students pelted him with eggs and a pair of shoes.

Nonetheless, the government seems willing to bear the economic and scientific costs, as well as potential damage to its credibility, if it means more control over the internet. For the international community, Beijing’s cyber-policy is a sign of the challenge that a more powerful China presents to the liberal world order, which prioritises values such as freedom of speech. It also reflects the paradox inherent in China’s efforts to promote itself as a champion of globalisation, while simultaneously advocating a model of internet sovereignty and closing its cyber-world to information and investment from abroad.

Adapted from The Third Revolution: Xi Jinping and the New Chinese State by Elizabeth C Economy, published by Oxford University Press and available at guardianbookshop.com

• Follow the Long Read on Twitter at @gdnlongread, or sign up to the long read weekly email here.