It is three weeks since Sir Tim Hunt, a Nobel prize winner, shared his sexist opinion of female scientists – distractingly sexy, prone to weep when criticised and best segregated at work – with a room full of science writers. His remarks were relayed into the Twittersphere by several of those present, including British-based science writer Connie St Louis. At once, he came under global and sometimes viciously personal attack on social media. He delivered a non-apology on BBC radio. According to his wife, also a senior scientist at UCL, it was made clear to her that to protect UCL’s reputation, he had to resign.

Within 24 hours of his pre-lunch toast, he had gone. By the weekend, he was complaining to sympathisers that he had been hung out to dry, unleashing a wave of support that included famous colleagues such as Richard Dawkins and Brian Cox. Today Jonathan Dimbleby joined the protest. Next week, UCL’s council meets and the Hunt affair will once again be on the agenda. This bitter mix of resentments amplified by the polarising environment of social media should have met a calmer official response. But the professor still had to go.

The Hunt camp claims feminists are too humourless to see that it was a joke. But as the provost of UCL, Professor Michael Arthur, pointed out when he indicated last Friday that Professor Hunt would not be reinstated, it was impossible for an institution to tolerate someone to whom they had awarded an honorary post, even a 71-year-old Nobel prize winner, expressing views even in jest that so comprehensively undermined its own reputation as a leading supporter of female scientists.

All the same, the backlash owes something to the way that it appeared (not least because Professor Hunt encouraged the view) that he had been the victim of some kind of kangaroo court. There were echoes of the pre-social-media-era treatment of the Labour foreign secretary, Robin Cook, when he was telephoned at the airport by Alastair Campbell to tell him he had to choose between his job and his lover [see footnote]. The UCL provost says he was not aware that Professor Hunt felt pressured into resignation. If that had been made clear at the time, some of the bitterness might have ebbed out of the debate.

All the same, the surge of support shows how widely misunderstood the pressing need for feminist activism still is, particularly in science. According to the latest evidence, women occupy just 12% of jobs in science, technology and engineering. In research, women earn less, are less likely to be promoted, and win fewer awards to support their work. A third of PhD students are women, but only one in 10 professors. This is not a joking matter (although the #distractinglysexy hashtag did a good job of showing there could be a funny side).

Twitter is loud, shouty and mainly male. It is rubbish at nuance, detail or ambivalence but it is perfect for rushing noisily to judgment, sometimes – as women from Connie St Louis to Caroline Criado-Perez have learned – in a downright threatening way. It is not only academia that suffers from internet bullying. In Scotland, Labour has repeatedly asked the SNP to deal with aggressive cybernats. The experience of UCL is another warning that a Twitterstorm is a digital riot, and that is how it should be treated.

• This article was amended on 1 July 2015. An earlier version referred incorrectly to “the pre-social-media era dumping” of Robin Cook. Also Alastair Campbell has pointed out in a letter to the Guardian that the claim he told Robin Cook “he had to choose between his job and his lover” is inaccurate. This article was further amended on 13 July 2015 as the earlier version said that Prof Hunt had gone “within 24 hours of his after-dinner speech”. This has been corrected.

