The decision by Facebook to ban six prominent figures of the alt-right movement, along with Louis Farrakhan, from both Facebook and its subsidiary Instagram, is a significant development in the struggle against online extremism. It is also a step on to a wobbly moral tightrope where decisions about censorship are made for the whole world by a few giant American advertising companies.

This is not an entirely satisfactory position, but it appears to be the least bad available at the moment. Global social media networks are neither traditional publishers, who can reasonably be held responsible for everything that appears on them, nor wholly neutral carriers, like the telephone companies. Their interests are not entirely aligned with society’s, nor with their individual users’. In particular, the social networks want users to spend as much time as possible with them, so that profiles of their interests and desires can be constructed and sold on to advertisers.

This trade is not always, possibly not often, in the best interests of users. It is certainly not often in the best interests of democracy. In discussions of traditional press freedom the distinction was made between what the public was interested in and what was in the public interest. For many years the social media advertising giants took the view that this distinction had been entirely outmoded by technology. Their duty was to supply whatever the public wanted, their business model depended on it, and the volume of material they had to handle made pre-moderation impossible. None of these arguments is now compelling. Some of the things for which there is an appetite, from political extremism to child abuse images, are damaging both to their consumers and to wider society. It is right to ban them so far as possible. The algorithmic selection of material designed to maximise the time that users spend on a website has an inexorably centrifugal effect on opinions, driving them out from the centre to the extremes, because that’s where the emotion is. Nowhere on YouTube are you more than a few clicks from extremist or conspiratorial material. When a Ukip candidate to the European parliament can use the medium to discuss raping an MP the boundaries of permissible free speech are clearly overstepped and democracy as well as decency is threatened. Whether or not such conduct is criminal, no socially responsible company should enable it, as YouTube, owned by Google, does.

Holding the social media companies to some standard of social responsibility is not without problems. The most obvious is that they need to all be held to the same standard, for reasons of fairness as well as efficiency. Little is accomplished if content deemed dangerous and obnoxious is not banned everywhere but only on one or two of the networks. Even when content is swept away from all of the easily accessible parts of the internet, it will thrive in fetid crannies. That is still a better outcome than inaction. Another problem will become increasingly urgent. Once it becomes obvious that the big social networks have the power to act as gatekeepers, there will be competition to manipulate the gatekeepers from above. Donald Trump reacted to Facebook’s ban by tweeting in support of one of the most egregiously loathsome conspiracy theorists targeted, and demanding that the New York Times, the Washington Post and CNN be banned in their turn after Facebook’s decision. The struggle to maintain minimal standards of decency and fairness will be long and hard. But it must be fought.