Maybe China’s authoritarian leaders were on to something after all.

In 2011 and 2012, the Chinese government began imposing a series of tough new restrictions designed to rein in what was then the country’s most popular and freewheeling social media platform, Sina Weibo.

It began with new rules making all weibo (microblogging) account users register with their real names and identity numbers, aiming to end one of microblogging’s most popular features – its anonymity. It made internet companies liable for content spread on its platforms. Individuals and groups were prohibited from using the internet to spread rumours, disrupt social stability, subvert state power or to organise or incite illegal gatherings. Scores of websites were shut, weibo accounts closed and microbloggers jailed.

China’s jittery, control-oriented rulers were reacting to a series of unrelated major events during that chaotic period that seemed to catch them uncharacteristically off guard.

First was the Arab Spring that convulsed the Middle East and briefly inspired anonymous calls, from an obscure overseas-based Chinese-language website, for copycat protests in Beijing, Shanghai and other cities. In 2012, before the start of that year’s crucial Communist Party Congress, came the fall of Chongqing Party boss Bo Xilai, with the dramatic account of his police chief’s flight to the United States consulate in Chengdu and the murder of a British businessman, all revealed in soap-opera fashion via the internet.

In April 2012 came the thrilling escape from house confinement of the blind “barefoot lawyer” Chen Guangcheng, who ended up at the US embassy in Beijing and was flown to exile in America. Chinese authorities tried to censor all online mention of Chen, but Weibo users began posting photos of themselves wearing dark glasses, in solidarity with the blind activist.

But the biggest turning point was in mid-March 2012, when all the major weibo sites and key search engines began circulating unsourced reports of a possible coup in Beijing, with some users posting photos of military vehicles in the capital city’s streets. More than a dozen sites were shut down, and bloggers detained, for sparking the coup rumours.

Why Facebook and Google’s China dream will cost more than it pays

Before the crackdown of 2012, China’s internet was akin to the Wild West, a new and largely unregulated free speech platform where the country’s “netizens” could openly exchange views and news – even those critical of the Communist Party. As a correspondent based in China at the time, I saw this period as a hopeful potential turning point for China, making the government more accountable and giving ordinary citizens, for the first time, a platform to express dissent.

China’s leaders, of course, saw it differently. They became aware, belatedly, of the disruptive power of an unchecked internet and its potential to undermine their system of government. After being largely complacent about the explosive growth of the online space, they soon realised the internet was an existential threat that needed to be strictly controlled and regulated, lest it undermine their very regime.

That crucial period in China comes to mind as the United States now struggles with some of the very same questions; should internet discourse remain totally free, or should there be some regulations? Should internet companies be held liable for what appears on their platforms? Should pernicious users be allowed to use platforms like Facebook and Twitter to create fake accounts to misinform the public or incite disorder?

Did ancient Hindus surf the Web?

The tipping point in the US came in 2016, not from a blind country lawyer or a coup rumour, but with a concerted campaign by Russian intelligence operatives to disrupt the American presidential election. Hoax sites spawned wild conspiracy theories – like Democrats running a paedophile ring in the back of a pizza parlour – and disinformation like claims of the Pope endorsing Donald Trump. The hoax Facebook page “Blacktivist”, a fake Russian site, aimed to stir racial unrest, and claimed more followers than the official Black Lives Matter site.

The internet giants are taking notice, and trying to fend off aggressive regulation through self-policing. Facebook removed more than a half a billion fake accounts in the first half of this year alone. All the tech companies have become more aggressive about rooting out fake accounts, disinformation, and hate speech. Some popular users such as Alex Jones, who traffics in fringe conspiracy theories, have had their accounts removed from top platforms.

Why China and Hong Kong must heed America’s immigration debate

Congressional committees in the US have been holding hearings and hauling in representatives of the big internet companies, looking for ways to contain the freewheeling online space. Ahead of this year’s November midterm elections, members of the intelligence committees in the House and Senate are particularly concerned about fake sites that promote real events, like a rally named “Trump Nightmare Must End” called for at Times Square. Other sites promote anti-racist rallies to counter right-wing protests, apparently hoping to stir up clashes.

So, to recap: Concern about social media platforms being used to organise and incite public gatherings that can lead to violence. Verifying users with real names and policing fake or anonymous accounts. Making internet companies liable for the content that appears on their sites. Dark warnings of overseas operatives using the internet’s freedoms to undermine the system of government. Taking down sites and suspending accounts of those trafficking in conspiracy theories, disinformation and rumours. Sound familiar?

US politicians are starting to sound a lot like China’s leaders when warning of the insidious dangers of an untamed, unregulated internet. And European governments have gone even further down the regulatory path, after seeing the internet used to impact the Brexit vote in the United Kingdom, and the presidential election in France.

The motives are entirely different between China and the West. The US and western Europe are trying to protect their open, liberal democracies from those outside bent on subversion. In China, it’s an unelected, authoritarian regime trying to maintain its rule by, among other things, controlling access to information and preventing like-minded people from gathering in the virtual public square.

But what is clear is that the early, naive promise of an open and borderless internet as a bottom-up democratising force and a marketplace of ideas is giving way to a new reality of regulation and top-down control.

The shift may have been inevitable. But it was China’s communist rulers who may have figured it out first. They are likely now thinking: we told you so.

Keith B. Richburg, a former Washington Post correspondent, is director of the University of Hong Kong’s Journalism and Media Studies Centre