Policing protests: Containment or contagion?
In Istanbul it was plans to build on a city centre park.
In Sao Paulo it was an increase in the price of a bus ticket.
In both cases seemingly local issues triggered initial protests which then spread around the country.
And in both Turkey and Brazil, allegations of police brutality have seemed to fuel the protesters' ire.
In Turkey, the unrest began on 28 May as a protest against plans to develop Gezi Park, a rare green space in central Istanbul.
After riot police used tear gas and water cannon to clear the park, the demonstrations mushroomed, with thousands of people protesting in Taksim Square, and solidarity protests around the country.
The Turkish government later admitted that the violent police response to the initial protests was an overreaction.
End Quote Roger Gomm Former Metropolitan Police commander
What you want to avoid is police being the trigger for further unrest”
Medical officials now estimate that 5,000 people have been injured and at least four killed since the protests began in earnest.
The police's use of large quantities of tear gas over the past weeks has drawn sharp criticism from the Turkish Medical Association, which has warned of the dangers of exposing large numbers of people to the chemical.
Across Brazil, protests have been taking place for more than a week against corruption, inefficient public services and high levels of spending on preparations for next year's World Cup.
Anger at police tactics at earlier demonstrations, notably in Sao Paulo a week ago, has given young people more incentive to protest, according to the BBC's Gary Duffy.
The police have been accused of firing rubber bullets at peaceful protesters, with many officers allegedly hiding their name-tags to conceal their identities.
Journalists from national news organisations were among those injured, and they said they had been deliberately targeted.
Both Turkey and Brazil have a quite different style of policing from the more "democratic" British tradition, according to Roger Gomm, a former public order commander for London's Metropolitan Police.
Forces in the UK try to use a "community policing" approach to managing protests and put a high value on communicating and negotiating with demonstrators, he says.On the beat
The British "bobby" might spend one day walking the beat talking to people and the next deployed on a public order job, so is more used to communicating with locals than an officer from a more military-style police agency such as those found abroad, according to Mr Gomm.
"If demonstrators do block an area, there is a balance to be struck between their right to assemble and express their views, and others' right to go about their daily business."
In 2009 British Tamils occupied Parliament Square in central London, lobbying the British government to intervene in the Sri Lankan conflict.
At times protesters blocked roads, and communication was sometimes difficult, but despite these challenges for the police the protest was allowed to continue, and it slowly wound down over a period of three months.
A performance artist's silent "standing man" protest in Taksim Square on Monday has been taken up by hundreds of protesters and spread around the country.
But even this peaceful form of protest can have you arrested in Turkey.
Hurriyet Daily News reports on rumours in Istanbul that standing protesters are told the prosecutor "will find a reason" for their arrest.
The tactic of containment or "kettling" of protesters has been used extensively by the Metropolitan Police in recent years, notably at the G20 protests in 2009 and at anti-cuts demonstrations in 2011.
In a ruling on Tuesday relating to a rally in 2011, High Court judges found that containment was necessary, but they said being filmed and handing over personal details as "the price of release" was a step too far.
During the riots in several English cities in August 2011, some commentators called for the police to use water cannon.
In fact, water cannon have never been used in mainland Britain, though they have been deployed for unrest in Northern Ireland.
Human rights group Liberty claims that there are measures in use in Britain which undermine the right to peaceful protest, pointing out anti-terrorism stop-and-search powers and laws on anti-social behaviour, in particular.Trigger?
Former commander Roger Gomm says that when protests become violent, the police are duty bound to act - and then the situation becomes more challenging.
"What you want to avoid is police being the trigger" for further unrest, he adds.
And that is exactly what can happen according to Steve Reicher, a psychology professor at the University of St Andrews, who says a police clampdown can become a self-fulfilling prophecy.
This is the first generation whose lives, and psychology, have been shaped by ready access to information technology and social media”
Professor Reicher, an expert in crowd psychology, says the balance of voices within a heterogeneous crowd is affected by the relationship between the crowd and the police.
Under conditions where the crowd is treated as all the same, and all dangerous, the crowd changes, he says.
The police actions have given credence to the views held by some in the crowd that they are living in a society where their opinions aren't listened to.
Similarly, authorities' attempts to "pathologise" crowds as looters and vandals, or as immature, can backfire, he claims, pointing to Turkish Prime Minister Recep Tayyip Erdogan's exhortation to parents to "take their children in hand".Right to assembly
The right to peaceful assembly and to expression of views, referred to by Roger Gomm, is set out in the European Convention on Human Rights (ECHR), which Turkey ratified in 1954.
In a statement earlier this week on the developments in Turkey, the Council of Europe drew attention to the standards set by the ECHR on freedom of assembly, and its limits.
Secretary General Thorbjorn Jagland pointed out that the European Court of Human Rights had previously ruled that "the use of tear gas in confined places, including hospitals, is neither necessary nor proportionate" under European law.
Technology is changing protests.
Not only can protesters use smartphones to arrange flash mobs, they can also use them to take pictures of police.
And those pictures can be sent around the world in a flash.
This makes it harder for authorities to portray protesters as "other" - or to suppress all coverage of protests - and makes it easier for demonstrators to win the propaganda war.