If the police had wanted to avoid violence at the Carnival of Full Enjoyment on Monday of this week they could easily have done so.
Instead they decided to instigate confrontation from the outset. The whole of Edinburgh was subject to a Section 60 ruling, giving police the power to stop, detain and harass at will.
The day started with people dressed as clowns being penned in and searched on the ground that they might be responsible for violent disorder.
Volunteer medics and musicians were also targeted. Having created a tense situation by penning in and pushing around crowds of people the disorder that followed was inevitable.
Dozens of people were injured by truncheon blows and several more were arrested.
In farcical scenes, panicked officers loudly argued with their own colleagues about tactics and deployment.
No doubt the violent images will now be used to justify the huge amounts of money wasted on a repressive and unnecessary police operation.