The massive demonstrations of recent weeks in Hong Kong and Sudan may seem to be totally disparate events. But they have more in common than meets the eye. The attempts by the authorities to disperse them with threats of violence or with peaceful promises is part of a wider global crackdown on people taking to the streets. But the creativity of protesters in finding ever new ways of making their voices heard, both online and in the streets, is the real trend to note.

When governments are seen as flawed or repressive, people search for avenues other than just the ballot box. These are the politics of voice and not just of vote, as the Indian political scientist Neera Chandhoke has called it.

But the crackdown on such voices has been widespread and sometimes ferocious. Across the globe, the space for people to protest, to form organisations and to speak the truth to power has been under increasing pressure for more than a decade. From barring foreign funding for NGOs to dispersals of protests or arrests and killings of activists and journalists, these attacks on civic space directly affect and often violate basic human rights, including the freedom to protest. All of this endangers not just democracy but the rule of law and development. No wonder institutions as diverse as the UN high commissioner for human rights and the Davos World Economic Forum have identified attacks on civic space as among the key challenges of our times.

Governments have become particularly adept in learning to manage, control and repress the voices of people when they are deemed too critical of the powers that be. Even in the early 2000s, the colour revolutions in Georgia and Ukraine and the Arab spring directly triggered neighbouring autocrats to test and apply new muzzles on civil society. Or, as Alexander Lukashenko, the president of Belarus infamously said of his country, there will be no “rose, orange or banana” revolutions. Laws in which NGOs were dubbed foreign agents were copied, sometimes almost literally, from one country to another. William Dobson has dubbed this “the dictator’s learning curve”. Such government tactics have stymied many burgeoning democracy movements. And the shrinking of civic space has not been limited to autocratic regimes.

But protest movements have also been learning. Both from past failures and from successful tactics abroad. In Sudan, protesters have explicitly expressed the wish that their movement should not become another Egypt, learning from the military takeover there after the failed Arab spring. And in Hong Kong, current organisers have learned lessons from the stalled 2014 umbrella movement, for example, by more anonymously calling for protests.

The events of the past weeks show that citizens can actively shape the room for dissent, creating new spaces when necessary. Even in Sudan where the very violent crackdown on peaceful protests emptied the streets, the mobilisation has shifted back to social media and the internet, which had also initially been used by the Sudanese Professionals Organisation (SPO), one of the key drivers behind the protests, to set demands and inform the protesters. As the Guardian’s Nesrine Malik noted, the very fact that much of the internet in Sudan has been shut down repeatedly since shows that mobilising online matters.

The #BlueforSudan hashtag that caught on internationally last week is an example of the flame of protest being carried on beyond a country’s borders by its diaspora and sympathisers. Apart from keeping interest in the issues alive, such online actions also serve to commemorate – the blue online movement was created to mourn the killing of one of the protesters. The SPO’s social media also remains very active, ready to revert back to the streets whenever the circumstances permit. This constant shifting between online and offline spaces is one of the trademarks of current social protest movements and reflects how they learn from one another. And even more than before, using all online channels at their disposal, protesters have become particularly aware of the power of language and of framing. The current war of words over whether Hong Kong’s protesters are peaceful youngsters or violent rioters is a good example.

These tactics may not always yield immediate results and violent setbacks may still occur, as Sudan shows, but they do prevent the total stifling of protest movements. The enduring creativity and resilience of the protests in the streets of Hong Kong and Khartoum pits something very strong against the copycat learning of one government from another. The dictator’s learning curve is being overtaken by something promising: the people’s learning curve.

• Antoine Buyse is a professor of human rights and director of the Netherlands Institute of Human Rights