“SOCIAL media are the worst menace to society,” said Recep Tayyip Erdogan, Turkey’s prime minister, on June 2nd. Such fears delight dissenters. Protesters’ placards in Brazil goad the authorities with slogans such as “We come from Facebook”.

Enthusiasts called protesters in Egypt, Iran, Moldova and Tunisia “Twitter revolutionaries”. That was premature: much of the social-media content supporting the pro-democracy cause came from supporters abroad. But protests in Turkey and Brazil, where digital media are especially popular, do show how technology can muster, manage and amplify demonstrations. Zeynep Tufekci of Princeton University interviewed scores of Turkish protesters. Most cited social media as a spur.

Social media mean that pictures and video spread rapidly; supporters arrive more quickly than police can cart them away, so governments can no longer rely on quelling minor protests by force. A video circulating in Brazil advises citizen journalists to work in packs, adopting military formations to catch government wrongdoing from every available angle.

Highlighting outrageous police behaviour can prompt people to get involved. It also can show more innocuous scenes than the punch-ups and arrests that attract news photographers. These may encourage the hesitant or timid, showing that “protesters are not hooligans or terrorists but people just like you,” says Ethan Zuckerman of MIT. Protests in Brazil have inspired a jolly online video game, in which Facebook-users guide a grinning demonstrator away from cartoon cops.

Social media also counter inflammatory or complacent official channels. When a Turkish television station broadcast a documentary about penguins instead of the street protests, wags photoshopped the bedraggled birds into images of police soaking youths with water cannon, and circulated them in disgust.

Swelling the number of protesters is one thing. Co-ordinating them is another. Several hundred social-media pages advertised demonstrations across Brazil, offering tips on dodging water cannon; some sought volunteers to care for demonstrators’ children. They also helped to direct people who wished to protest in cities abroad. Brazilian hackers used denial of service attacks to briefly disable government websites, including one for next year’s costly football World Cup. All this can help give startling momentum in the real world and online. But it does not necessarily make the protests effective. An amorphous digital crowd can find it hard to agree on demands, accept compromises, or discipline provocateurs. Online voting and other clever e-democracy tools may solve this problem. But not yet.

In the meantime technology can serve the powerful, too. Protesters in Turkey and Brazil say their mobile internet access was throttled, though congestion, not censorship, may be the real culprit. Instructions issued over social networks are easily monitored by police. Amateur footage provides authorities with visual records of those who attend. Witness, an American charity which trains citizen journalists, says that where official snooping is a danger, protesters should be filmed only from behind; last July YouTube, an online video site, introduced a face-blurring tool.

Most protesters are not so careful, and police are getting better at capturing this information themselves. Since 2011 cops in Brazil have tried head-mounted face-detection cameras, which authorities claim can capture up to 400 faces a second. Hoisting them on cheap drones would offer an even better view. Police forces can also recognise demonstrators without actually seeing them: some officers in America have kit capable of recording the identifying code of all the mobile phones within a given area, and officials can also beg or seize the data from mobile operators.

More sought-after is technology that can help forestall protests. Digital marketers have long analysed social-media messages to gauge opinions about products and brands. Brazil’s security services are said to be increasing online monitoring: this can alert police to impending unrest, and spot the main troublemakers. Such tools are experimental. Technology still gives protesters the upper hand, though what they do with it is another question.