Curfews have been imposed in multiple cities in the US, after unrest and protests have spread across the country over the death of an unarmed black man, George Floyd, in police custody.
Most of the protests began peacefully - and several stayed peaceful. But in a large number of cases, demonstrators clashed with police, set police cars on fire, vandalised property or looted shops. The National Guard has activated 5,000 of its personnel across 15 states and Washington DC.
Experts have also drawn parallels with the 2011 England riots - when a peaceful protest over a man who was shot dead by police turned into four days of unrest, with widespread looting and buildings set alight.
How do protests spread so quickly - and why do some become violent?
Protests spread when there's a shared identity
Incidents like Mr Floyd's death can "become a trigger moment because it symbolises a broader experience, amongst much larger numbers of people, about the relationship between police and the black community," says Prof Clifford Stott, an expert in crowd behaviour and public order policing at Keele University.
Confrontations are particularly likely when there are structural inequalities, he adds.
Prof Stott studied the 2011 England riots extensively, and found that the riots there spread because protesters in different cities identified with each other - either because of their ethnicity, or because they shared a dislike of the police.
This meant that, when the police appeared to be overwhelmed, rioters in different districts felt empowered to mobilise.
How the police respond matters
Violent protests are less likely when police have a good relationship with the local community - but how they react to demonstrations on the day also matters, experts say.
"Riots are a product of interactions - largely to do with the nature of the way police treats crowds," says Prof Stott.
For example, he says, in a large crowd of protesters, tensions may begin with just a few people confronting the police.
However, "police often react towards the crowd as a whole" - and if people feel that the police use of force against them is unjustified, this increases their "us versus them" mentality.
This "can change the way people feel about violence and confrontation - for example, they may start feeling that violence is legitimate given the circumstances."
Darnell Hunt, dean of social sciences at UCLA, believes police in the US "ramped up their aggressiveness" over the weekend.
"Deploying the National Guard, using rubber bullets, tear gas, and pepper spray - these are a range of police tactics that can exacerbate an already-tense situation."
It's a pattern that has been seen in other protests around the world too. For example, in 2019, Hong Kong saw seven months of anti-government protests, that began as mostly peaceful and ended up increasingly violent.
Experts highlight a series of police tactics that were seen as heavy-handed - including the firing of large amounts of tear gas at young protesters - as moves that galvanised protesters and made them more confrontational.
Prof Stott argues that police forces that have invested in de-escalation training are more likely to avoid violence at protests. He points to protests that were able to stay peaceful in the US over the weekend - such as in Camden, New Jersey, where officers joined the residents in a march against racism.
It also depends on what's at stake
Moral psychology can help explain why some protests turn violent, says Marloon Moojiman, an assistant professor in organisational behaviour at Rice University.
A person's sense of morality is central to how they see themselves, so "when we see something as immoral, it creates strong feelings, because we feel our understanding of morality has to be protected".
"This can override other concerns people have about keeping peace", because "if you think the system is broken, you're going to want to really do something drastic to show that that's not acceptable."
This can apply to a wide range of beliefs - for example, in an extreme case, someone who thinks abortion is a moral outrage may be more likely to say it's OK to bomb an abortion clinic, he says.
Research suggests that social media echo chambers could also make people more susceptible to endorsing violence, if they believe that their peers have the same moral views as them, he adds.
Looting and vandalism can be more targeted than you think
In the US, hundreds of businesses have been damaged, and there has been widespread looting in LA and Minneapolis over the weekend.
However, Prof Stott warns that while it's easy to assume that riots and crowds are "irrational and chaotic, none of that is true - it's highly structured and meaningful for the people taking part".
"To some extent, looting is an expression of power - black citizens may have felt disempowered in relation to the police - but in the context of a riot, the rioters momentarily become more powerful than the police."
Studies of previous riots show that places that get looted are often related to big businesses, and that looting "often relates to the sense of inequality related to living in capitalistic economies", he says.
Prof Hunt has studied the 1992 Los Angeles riots, which were sparked after four white police officers were acquitted over the videotaped beating of black motorist Rodney King.
He says there is "a long history of targeting, or selectivity", in vandalism and looting. "In the LA uprisings, you'd often see 'minority owned' spray painted on minority businesses, so that people would bypass those."
However, both Prof Stott and Prof Hunt caution that looting is complicated - especially as lots of people with different motivations take part, including people in poverty, or organised criminals.
The idea that violent protests are targeted and meaningful events to those taking part can also explain why looting occurs in some protests, but not others.
In Hong Kong, for example, protesters smashed shop windows, threw petrol bombs at police, and defaced the national emblem - but there was no looting.
Lawrence Ho, a specialist in policing and public order management at the Education University of Hong Kong, believes this is because those protests were triggered by political developments and anger at the police, rather than discrimination and social inequality.
"Vandalism was targeted at stores seen to have a strong connection to mainland China," says Dr Ho. "It was a deliberate attempt to convey a message."
How can violence be prevented?
Public order experts say that for the police, being seen as legitimate and able to engage protesters in dialogue is key.
"Good policing tries to avoid an 'us' and 'them' mentality, and also tries to avoid the sense that police can act in ways that people see as illegitimate," says Prof Stott.
Dr Ho also believes that negotiation is the best way - but points out that "one of the hardest things today is that a lot of protests are leaderless. If you can't find the leader, you can't negotiate with them."
More generally, he adds, politicians can make matters better - or worse - based on their approach to dialogue, and whether they use emergency legislation.
Ultimately, however, riots can be a symptom of deep-seated tensions and complicated issues that don't have an easy solution.
Prof Hunt says this week's US riots are the most serious ones since 1968 - after Martin Luther King was assassinated.
"You can't think about police brutality, and the profiling of certain communities, without thinking about the inequalities that exist in society and fuel those concerns," he says.
"The George Floyd case was not the cause - it's more like the straw that broke the camel's back. You could argue even the police killings are symptoms - the underlying cause is white supremacy, racism, and things the US has not fundamentally dealt with."