One of the things we learned in 2016 was how the internet is affecting democratic politics. We discovered how fake news spreads like wildfire through social networks, how Google’s dominance of search and ownership of YouTube can distort the public sphere and how “alt-right” political activists have mastered the affordances of the technology to build a formidable propaganda system. We also discovered what we ought to have known a long time ago, namely that the internet holds up a mirror to human nature, and that some of what we see reflected in it ain’t pretty.

Throughout all of this it’s been instructive to observe the intellectual contortions of the internet giants. Their pole position has always been a claim to the freehold of the moral high ground. They stand by the first amendment to the US constitution and are mere conduits for the free expression of free citizens. It is not for them to determine what can and cannot be uttered on their platforms. And if some of what is uttered is tasteless, cruel or otherwise vile, well, that’s just how folks are. If Google’s search algorithms favoured sites that specialised in hate speech, antisemitism and worse, well that was nothing to do with Google. After all, none of its employees was involved in highlighting that stuff.

The fact that the more free speech there is, the better their corporate bottom lines was, conveniently, downplayed. And when the public – and politicians – began to notice the horrible stuff that happens online, the companies’ first response was to pooh-pooh the concerns. “Of all the content on Facebook,” wrote its chief executive, Mark Zuckerberg, “more than 99% of what people see is authentic. Only a very small amount is fake news and hoaxes.” The PR downsides of being conduits for hate speech and worse were viewed initially as just the cost of doing business.

But then came Brexit and the election of Donald Trump and it looked as though things were getting serious for the internet behemoths. People were beginning to suspect that they were messing with our politics. Suddenly the companies discovered that their support for the first amendment was not unconditional. They pledged to take action to detect and expunge the horrible stuff that was flowing through their servers. Thousands of contractors were recruited to monitor and expunge the bad stuff. “The bottom line,” declared Zuckerberg, “is: we take misinformation seriously.” Google discovered that it could, after all, modify its algorithms so that Holocaust-denying sites would not figure in “autocomplete” suggestions in searches about Jews. And so on.

So now we find ourselves in a strange place where huge corporations are in a position to determine what is published and what is not. In a working democracy, this kind of decision should be the prerogative of the courts. It’s as if society has outsourced a critical public responsibility to a pair of secretive, privately owned outfits. And it raises a really interesting question: why have two companies that have hitherto always maintained that they are mere conduits for free expression suddenly become conscientious censors?

Facebook Twitter Pinterest Facebook’s Zuckerberg is being forced to take his role as censor more seriously. Photograph: Justin Sullivan/Getty Images

The answer is that they fear that if they are not seen to be doing something about it, then the lawmakers will act. Until recently, this didn’t seem very likely. But things have changed. In June the German Bundestag passed a law requiring social media sites to remove hate speech within 24 hours or face swingeing fines. That was alarming enough for the net companies, but now an existential threat has appeared. A bipartisan group of US senators led by Democratic senator Claire McCaskill has introduced a bill that opens a crack in the legislation that has hitherto provided internet companies with rock-solid legal immunity from responsibility for what is published on their sites.

This vital immunity is provided by section 230 of the 1996 Communications Decency Act, which says that: “No provider or user of an interactive computer service shall be treated as the publisher or speaker of any information provided by another information content provider.” The McCaskill bill proposes to “clarify” section 230 so that websites that knowingly facilitate sex trafficking can be held liable for what they publish. It’s cleverly drafted to target a particularly odious use of the immunity provided by section 230. But the internet companies are deeply alarmed by it, because they know it could be the thin end of a powerful wedge – a wedge that could, effectively, destroy their business models (and change the internet). But they’re in a bind because – after all – they’re all opposed to sex slavery. Just like they were once all in favour of the first amendment. This is soon going to get really interesting. Stay tuned.