If only the Central Intelligence Agency had sneaked an informer into the group that planned last Tuesday's attacks on New York and Washington.
As the CIA and other security agencies struggle to explain one of the worst intelligence failures in their history, many critics are blaming the disaster on official faith in machines over men.
But the experience of other countries that have used more traditional cloak-and-dagger double agents to penetrate their enemies' ranks suggests that the results are not always as good as they might be. And these governments have often preferred to ignore ethical questions about the sort of people they deal with in the dirty world of espionage.
In the wake of this week's savage assaults, a chorus of voices has accused US intelligence agencies of paying too little attention to 'human intelligence' - information coming from people on the ground.
"When electronic capabilities came onstream, the Americans went the technological route," says Michael Clarke, head of the Centre for Defence Studies at Kings College in London. "Human intelligence was messier and more dangerous, and most Western agencies got out of it" to some extent.
A handful of countries, however, stuck with their agents in the field.
The Russians, for example, who built their spy network in the 1920s, when technology was scarce, scored successes with double agents such as Kim Philby, Aldrich Ames, and Robert Hanssen.
The Israelis have always relied heavily on informers among Palestinian ranks, and the British learned almost all they knew about the IRA from members they had 'turned.'
"The most important secrets can only be found in the human mind," says Mikhail Lyubimov, a 25-year veteran of the Soviet KGB, who is now a popular author of espionage novels.
In this difficult and dangerous work, the Israelis have an advantage; they have been able to use Jews born in Arab countries who can blend into Arab society, and they have been able to blackmail or manipulate Palestinians in the occupied territories into informing on their neighbors.
The British Army has been able to draw on Catholics in Northern Ireland who oppose the IRA, and has also been known to use blackmail. The Soviets could exploit ideological sympathies in closet communists, or simply pay a lot of money.
But the task of penetrating the sort of closely knit Islamic terrorist cell typical of the Middle East - the sort that is widely believed responsible for Tuesday's atrocity - is much, much harder.
"When you have a family or clan-based terrorist cell, and where the requirement for getting in is to kill some people, penetrating those groups is no walk in the park," former CIA Director Robert Gates said earlier this week.
Nor can you set up such double agents overnight. "It takes years to get human intelligence up and running," says Professor Clarke. "You need 'sleepers' who come to recognize patterns of behavior, and those sources are critical. When you need human intelligence, nothing else will do."
The US National Commission on Terrorism found in its report last year that the CIA had paid too little attention to such sources. "Complex bureaucratic procedures now in place send an unmistakable message to CIA officers in the field that recruiting clandestine sources of terrorist information is encouraged in theory but discouraged in practice," it said.
Among those procedures are 1995 guidelines "restricting recruitment of unsavory sources," such as those who had committed human rights abuses, or killed Americans.
CIA officials insist that these guidelines merely "make us cognizant of the sort of people we are dealing with," in the words of spokeswoman Anya Guilsher. "We don't shy away from dealing with unsavory characters." In 1998, she added, the CIA launched a seven-year program to increase the recruitment of operations officers by 30 percent.
But recruiting undercover agents who can get close to Islamic terrorist organizations is hard, she points out. "These are not the sort of people you meet at cocktail parties. James Bond would not make it in this era."
The sort of people you do need have emerged in recent years in Northern Ireland, telling their stories of undercover work for the British army and the Northern Irish police, the Royal Ulster Constabulary.
Brian Nelson, for example, has recalled how he worked as a British army agent when he was intelligence chief for the Protestant paramilitary Ulster Defence Association. In that role, he provided a UDA hit squad with a photograph of prominent Catholic attorney Patrick Finucane, to make sure they killed the intended target.
The British Army ran a covert unit, working under the biblical motto "Fishers of Men," dedicated to recruiting and managing informers. One former soldier, who infiltrated the IRA, says their work was invaluable.
"We were the eyes and ears of the Army," he says. "We provided everything from low-level intelligence, like gossip... to high-grade intelligence. We provided de tails of bombings and shootings."
Catholic Willie Carlin, an ex-informer, says he and fellow spies may have been involved themselves in such violence, but that overall "they saved more lives than they cost. Because of these men, bombs went wrong and didn't go off. Or the Army was tipped off long enough in advance to make sure the area was evacuated."
The use of such agents, however, undermined the rule of law, say some. "This distorted the criminal justice system, because you had people involved in criminal acts who were not pursued, in order to encourage them to inform on paramilitary activities," says Maggie Beirne of the Belfast-based human rights watchdog, the Committee for the Administration of Justice.
"When those who make the law break the law, then there is no law," reads one piece of Catholic republican graffiti in Belfast.
In practice, say intelligence experts, agents are rarely squeamish about the sort of people they recruit if they want to track terrorists. "Ethical questions do not exercise the security agencies. They are pragmatic people who want to get the job done, and there is not a great deal of moral agonizing, because they know the intelligence world is extremely dirty,"says Professor Clarke.
But that, he adds, makes it all the more important that the agencies are accountable in some way to the public - for example, through parliament.
In Britain, the parliamentary committee responsible for the intelligence agencies works in private, and generally reports only to the prime minister. And incidents of British-paid agents being involved themselves in murder "have not been properly dealt with,"he adds. "There is a blind spot, when it comes to Northern Ireland."
There are questions, too, about the real value of 'human intelligence,' even when it is accurate, since it is not always properly appreciated.
"In some ways, the whole discussion about human versus technical means of intelligence gathering is pointless," argues Vitaly Shlykov, a former senior official in the Soviet military intelligence agency GRU. "Both tend to produce fairly reliable raw results; things go wrong in the way information is analyzed and used."
Josef Stalin, for example, ignored repeated reports from a Soviet spy that Germany was about to attack the USSR in 1941; he found the reports incredible given the non-aggression pact he had signed with Hitler. And in 1973, recalls Yossi Alpher, an Israeli security analyst, Israeli spies warned that Egyptian and Syrian planes were about to attack Israel. But "the intelligence analysts...had no corroboration from technical means, and they put so much stock in technical means that they tended to pooh-pooh human sources."
The worst intelligence failure ever - of both the American and Soviet agencies - was not foreseeing the collapse of the Soviet Union, says Mr. Shlykov. They "failed to see the fatal weaknesses of the USSR, though both had more than enough information to do so. This really shows the limitations of intelligence," he says.
"Even the most effective secret services cannot guarantee the security of the state."