A decade ago, I was sat with a group of journalists in London at a security briefing held by former intelligence officials. One of the analysts told the group of his "nightmare scenario".
It wasn't a large-scale attack like the one that killed 52 people in the British capital a month earlier, dubbed the 7/7 attacks.
No, what worried this former analyst was something else. The thing that kept him up at night were armed men on the streets of London indiscriminately shooting tourists.
His theory suggested that bigger plots, by their very nature, could be foiled through intelligence gathering and surveillance of suspects.
That bigger attacks required coordination and therefore were more susceptible to inadvertent leaks from members within the cells plotting the attacks.
What are almost impossible to detect are 'Lone Wolf' attacks that required little more than a gun, some bullets and the will.
I was reminded of this as images from Tunis filled our TV screens of panicked tourists running from gunfire outside of the Bardo National Museum. This, and similar attacks this year in Paris and Pakistan, highlight just how effective this is.
The very nature of "terrorism" is to terrorize a population. What is more effective than killing civilians randomly in the street?
These types of attacks are very difficult to defend against and for Tunisia the effect this will have will ripple through society. This is a country that survives on its tourism.
An audio tape released on Thursday suggests that the Islamic State of Iraq and the Levant claimed responsibility for the attack in Tunis.
This is significant for two reasons. Firstly, whether the group are behind the attack or not, it signals to others that such attacks are now permissible and that others should follow.
The second reason is a little more sinister. And has to do with spreading chaos and fear through societies about Muslims.
ISIL want chaos. They divide the world into two. Dar al Harb and Dar ul Muslim. Dar al Muslim is fairly self-explanatory and literally translates as the house of Islam and that is where Islamic rule takes place. For ISIL that is the caliphate, the territory they control in Syria and Iraq
Dar ul Harb is slightly more complex. That is where Islam does not rule. For ISIL that is the rest of the world.
ISIL want chaos in that part of the world because they see chaos leading to the rise of Islam. Using a gun and attacking tourist sites is a pretty easy way to spread chaos.
They want Muslims to be vilified in the West as they see that as a way to make young Muslims angry and stand up.
Add that to praise the attack garnered on social media forums, such as Twitter, and you have a powerful attraction.
Where there is praise there will be those who want that praise for themselves and will copy the attack. But this is not unique to "wannabe jihadists".
Let us, for example's sake, say that you are 15-year-old boy living in Denver, Colorado. You've been politically engaged for years, reading about America's actions across the world. You have no police record, no history of criminality. You live in a place where guns are easily available.
You go on protests, try and make your voice heard. What you do is wake one morning and decide to shoot up your school in a fit of rage. You are Eric Harris, and along with Dylan Klebold you will go down in history as the Columbine School shooters who killed 13 people and themselves in 1999.
Those attacks on Columbine were inspired, according to an FBI report, by an anger at the world and perceived injustices. That is not that dissimilar to the motivation ISIL fighters have.
It is a painful thing for a society to admit, but attacks like Columbine, like the ones in Tunis, will not stop, and living with them is the only realistic option.
There are only so many resources you can use to fight violence and for most societies those resources are concentrated on counterterrorism.
The "nightmare" attacks, the shootings that worried the analyst in London, are the ones that require a deeper look at ideology, anger, poverty, racism, religious hatred etc. That is not the job of your average intelligence service and are generational problems requiring societal change.
There is no doubt we have a problem with guns and violence. What we do not have is a solution to it, whether it is anger-inspired violence in the US or religious-inspired violence in Tunisia, and we are likely to see more of it rather than less.
Source: Al Jazeera