Woolwich killing: The long-feared attack
Wednesday's events in Woolwich have shocked the UK - but this was precisely the kind of attack that security chiefs have long feared could come.
The warning signs that a soldier would one day be targeted on the streets of Britain can be found in the heart of al-Qaeda's violent ideology and how that has been interpreted by followers in the UK and other Western nations.
The mindset of violent jihadists is influenced by many different factors - but one common factor among those who have been involved in acts of politically-motivated violence is the basic principle that they oppose a Western presence in the Islamic world.
Sometimes when purely political Islamists refer to this presence, they mean cultural pollution - the arrival of influences that they don't particularly want to see. Think scantily clad pop stars beamed around the world on satellite TV.
But for jihadists, it really comes down to the presence of soldiers - and an entire framework of belief that sees those personnel, whatever role they have been given under international law, as the enemy of Islam. That argument is often backed up with graphic images online of the suffering of ordinary women and children. It's all designed to whip up anger and a sense of burning injustice - the kind of injustice that leads people to be convinced that something must be done.
Now, most people who feel a sense of injustice obviously combat it in purely peaceful means. The point about terrorism is that the sense of injustice becomes a springboard for mental somersaults in the mind of someone who thinks that indiscriminate violence can create justice.
Bilal Abdulla was the Iraqi doctor who tried to bomb London and Glasgow Airport in 2007. At his trial he spoke clearly and coherently about how he became radicalised because he perceived that the British and Americans were murdering his people, rather than liberating a country from a dictator.
Back to the main point. The UK has witnessed a series of protests by radical Islamist groups that have been organised to specifically protest against soldiers who have served in Afghanistan.
The most infamous of these was an extremely tense incident in 2009 when a now-banned organisation disrupted a homecoming parade by the Royal Anglian Regiment in Luton.
The difficulty for the security services is establishing who is simply letting off steam and who is genuinely on the road to becoming a threat to public safety. What makes that job harder is that plotters are increasingly working alone, undirected from what remains of al-Qaeda's leadership. Armed with the ideology, they're expected to just get on with whatever terrible plan they have.
So while every counter-terrorism intelligence operation starts with trying to get into the head of an "individual of interest" - it's ultimately about whether they are dangerous.
This underbelly of anger over the military's role overseas has regularly featured in major counter-terrorism prosecutions - but it has also been part of attack plans on previous occasions.
In 2007, a joint investigation by the police and MI5 apprehended a Birmingham man who wanted to kidnap a British soldier. Parviz Khan wanted to emulate jihadists in Iraq by beheading a serviceman on camera before circulating the film online. He's now serving a life sentence.
The most well-known comparable anti-military incident elsewhere is the Fort Hood shootings in the USA, in which 13 people were killed by an army major reportedly radicalised by an al-Qaeda cleric.
More recently, two other groups in the UK have been jailed after considering targeting soldiers.
One of these cells talked about attacking Wootton Bassett, the Wiltshire town that used to come to a standstill as the bodies of personnel killed in Iraq and Afghanistan were repatriated.
The justification consistently deployed by extremists involved in these incidents is that the military took the war to Muslim countries - so they are now bringing it back.
"We must fight them as they fight us. An eye for an eye, a tooth for a tooth," said the Woolwich attacker who spoke with a London accent.
"I apologise that women have had to witness this today, but in our land our women have to see the same."The fear of failure
But there is another reason why this kind of attack was feared - the question of whether it represents a failure.
We have discovered that now the suspects were "known" to the authorities. That doesn't at this stage explain at all which agency knew precisely what and when, other than they had featured in "several investigations" in recent years but were not deemed to be involved in attack planning. There is a suggestion that one of the men may have been stopped by a security agency while travelling abroad - but the detail of that is very unclear.
The Security Service and police have finite resources - which is why they seek to focus on the most dangerous or immediate threats - and then later try to find out what they can about anyone else on the "periphery" of that investigation.
The P word emerged some years ago when it emerged that MI5 and the police had partial information about the ringleader of the 7/7 bombs. They both insisted at the later inquests they had no intelligence that he would become a threat to life.
So these are the questions that the security services will now need to answer: did they know very little - or did they know enough to justify devoting further resources to investigating either man.
The shadow of 7/7 looms large in the intelligence and security community because these people don't want to be accused of making a mistake that costs lives.