Mohamed Merah, the French gunman who killed Jewish children and French soldiers and then died in a firefight with police this month, was hardly an unknown quantity to intelligence and law enforcement officials on both sides of the Atlantic.
Merah made two trips to Afghanistan between 2010 and 2012, and was detained by U.S. forces during the first. He had a record of moderately serious criminal activities in France. He was even interviewed by France's domestic spy agency, the Central Directorate for Domestic Intelligence, or DCRI, in November 2011, following his trips to South Asia.
With so many red flags, how was he able to roam the streets freely - and assemble a formidable cache of weapons - in France?
U.S. officials have declined to say why Merah was detained in Afghanistan or what happened to him then, although at some point he was sent back to France.
U.S. officials certainly had enough intelligence about his visits to militants in Afghanistan to put him on the no fly list, the most restrictive of a set of U.S. databases designed to monitor and control potentially dangerous suspects.
Being on that list, Merah would have been barred from boarding planes that take off and land in the United States, as well as aircraft that overfly U.S. territory.
Merah's case is just the latest to demonstrate the limits of intelligence gathering and analysis, and the use of that information against potentially, but not actively, violent suspects living in a democratic society, say current and former U.S. and European officials and private experts on counter-terrorism policy.
The ability of Western law enforcement or intelligence services to prevent terrorist attacks from fellow citizens who have settled back home without acting on their intent to attack is fraught with complications and limitations, said Juan Zarate, a former senior adviser on counter-terrorism issues to former President George W. Bush.
LEGAL LIMITS, LOW PROFILE
For all the concerns about law enforcement overreach after 9/11, the reality is that the detention of suspect citizens absent an overt act of criminality - merely based on associations or speech - is not legal, he said.
Zarate noted that while legal systems in France and Spain give authorities much more flexibility to pick up and hold suspects on looser evidence of involvement with militants, there are still limitations dictated by law and democratic practices.
Zarate recalled another case of a lone wolf militant with many parallels to Merah's. In 2009, Carlos Bledsoe killed an Army private and wounded another soldier outside a military recruiting office in Little Rock, Arkansas.
Before then, Bledsoe had travelled to Yemen. There, according to testimony by his father to a U.S. congressional committee, he was arrested for overstaying his visa and held in a political prison, where he was interviewed by the U.S. Federal Bureau of Investigation.
He returned home, was monitored, but ultimately woke up one morning and decided to kill Army recruiters, Zarate said.
Jean-Louis Bruguiere, a former magistrate who was France's top counter-terrorism investigator and still consults for security agencies, told Reuters that as he understands the case, Merah's engagement with militants in Afghanistan prompted French authorities to deem him potentially dangerous upon his return.
Back in France, however, he did not conspicuously hang out with people suspected of planning violence. This made it legally difficult for French authorities to detain him, Bruguiere said.
The French government has said there is no evidence Merah was formally a member of any radical Islamist group.
After events such as the September 11, 2001 al Qaeda attacks on New York and Washington and the July 7, 2005 attacks on London's transport system, U.S. and allied spy agencies allocated significant new resources to monitoring the activities of young men, often from Middle Eastern or South Asian backgrounds, who travel from the West to Afghanistan or Pakistan.
Some U.S. officials said one of the reasons Merah was on the no-fly list was that the rules for putting names on that list were relaxed following the latest in a series of intelligence and legal glitches related to counter-terrorism that date back to before the September 11 attacks.
Investigations by Congress and an official inquiry known as the 9/11 Commission, revealed that the CIA had tracked two future September 11 hijackers to a meeting with suspected militants in Malaysia in January 2000. After that, the two suspects travelled to the United States and lived for months in San Diego. But due to fumbling and misjudgements involving the CIA and FBI, U.S. agencies only launched a manhunt for the men a few days before the attacks, at which point it was too late.
After post-attack inquiries, the United States instituted aggressive new programs to collect intelligence and created a new National Intelligence Director's office and, under its auspices, a National Counterterrorism Center to improve analysis and foster more information-sharing among competing agencies.
Efforts by the United States and its allies to dismantle al Qaeda's central command and kill its leaders over the years became more effective, culminating in the U.S. commando raid in May 2011 in which Osama bin Laden was killed.
But as intelligence agencies moved towards greater centralization and coordination, militants took the opposite tack, creating al Qaeda affiliates and franchises in venues such as North and East Africa and Yemen.
Later, leaders of the decentralized militant networks, such as U.S.-born, English-speaking preacher Anwar al Awlaki, encouraged followers to radicalize themselves and embark on whatever violent militant gestures were within their capabilities. According to the new al Qaeda ethos, even failures could be deemed successes if they produced publicity.
Awlaki was killed in a U.S. drone strike in September 2011.
PROLIFERATION OF MILITANT FACTIONS
The proliferation of militant factions, and the atomization of al Qaeda's central command, created new challenges for Western security agencies which made their jobs more difficult.
In Britain, for example, an intelligence collection operation called Operation Crevice which began in 2003 targeted a group of British suspects with links to militants in Pakistan. Over time, this produced a database of more than 4,000 telephone contacts involving dozens of individuals with whom the principal intelligence targets had been in contact.
On July 7, 2005, two of the people who had been in contact with some of those principal targets were part of a four-man cell of suicide bombers who attacked London's subway and bus system, killing 52.
However, British authorities, including the principal domestic spy agency MI-5, did not realize they had intelligence in hand on the two suspects until after the attack as they had never called enough attention to themselves before for British intelligence to deem them high-priority surveillance targets.
The case of the failed Christmas Day 2009 bombing of a U.S.-bound aircraft also demonstrated that, in the face of a fragmented militant movement, intelligence improvements instituted by U.S. agencies were not foolproof.
Umar Farouk Abdulmutallab, a Nigerian-born militant who allegedly became radicalized by al Qaeda operatives while studying Arabic in Yemen, managed to board a Detroit-bound airliner with a bomb hidden in his underpants, even though U.S. intelligence agencies had collected direct and indirect clues that he might pose a threat.
His father, a wealthy businessman, warned the U.S. Embassy in Nigeria before the attempted attack that his son was involved with Islamic extremists in Yemen. Other fragmentary intelligence reporting, including telephone intercepts, suggested that Awlaki, or people close to him, were discussing using a Nigerian in a possible attack plot.
NEEDLE IN A BARN FULL OF HAYSTACKS
But at the time, intelligence officials said, U.S. and allied agencies were trying to trace and sort through tens of thousands of email account holders who had been in contact with Awlaki in Yemen, the spy equivalent of looking for a needle in a barn full of haystacks.
Ultimately, the scraps of intelligence U.S. agencies had on Abdulmutallab and his plot were not assembled until after he failed to ignite his bomb as his flight began its descent in U.S. airspace. He was subdued by passengers, convicted, and jailed for life earlier this year.
While their literary exponents and political opponents portray spy agencies as both omnipotent and omniscient, current and former counterterrorism officials say the case of Mohamed Merah is just the latest chapter in what is likely to be a continuing run of intelligence misses and near-misses.
Merah's actions, said Bruce Riedel, a former senior CIA analyst who has advised President Barack Obama on counterterrorism policy, are straight out of the new al Qaeda strategy of smaller attacks using Western citizens who get training and indoctrination in Pakistan and then go kill the targets of the global jihad — Crusaders and Zionists.
These attacks, he said, are extremely difficult to pre-empt because the plot is so small you can't get inside of it.
(Editing by Warren Strobel and David Brunnstrom)