Long-term weaknesses in US intelligence-gathering have been ruthlessly exposed over the last fortnight by the Christmas Day airline plot and the Afghanistan suicide bombing that killed seven CIA officers, according to former and serving intelligence officers.
They are scathing about the way the operation in Afghanistan has been run and say it is part of an institutional weakness on the part of the CIA and other intelligence-gathering agencies.
The biggest crisis in intelligence-gathering since 9/11 has been brought about mainly because no single agency is in charge, they say, creating a situation in which about a dozen US intelligence agencies fight for their own turf.
The former officers were speaking as Barack Obama held an inquest at the White House into the communication breakdown between the CIA and other agencies that allowed the Nigerian bomb suspect Umar Farouk Abdulmutallab to come close to blowing up a US passenger plane on Christmas Day.
A report published on the eve of that meeting by the deputy head of military intelligence, Maj Gen Michael Flynn, offered a damning assessment of intelligence-gathering in Afghanistan. He said the vast apparatus there was only marginally relevant. Analysts in Washington were so starved of information, that "many say their jobs feel more like fortune-telling than detective work".
Larry Johnson, a former CIA officer and counterterrorism agent, said the CIA had become "sloppy" in its field intelligence gathering, and the suicide bombing at Khost in Afghanistan was part of that.
The CIA thought they had turned Humam Khalil Abu Mulal al-Balawi, a Jordanian doctor, into one of their agents and it allowed him on to the base after he asked for a meeting, promising to provide information about al-Qaida. He then blew himself up.
A school friend, Mohammed Yousef, said Balawi had deceived family and friends, telling them in March he was going to Turkey for further medical studies when he in fact travelled to Afghanistan to join the militants. He had wanted to die in a holy war, and wrote angry articles on the web calling for jihad against the US and Israel.
Johnson pointed to tactical failures at Forward Operating Base Chapman in Afghanistan, where the attack was made. He said an intelligence source as significant as Balawi should never have been brought inside the base, because it risked exposing him. Balawi should also have been debriefed by a much smaller group than the dozen or so CIA employees present when he set off the bomb.
He described those errors as symptomatic of a larger trend within the agency of putting desk workers into the field. "You have a lot of inexperienced people being shoved out into the field without adequate mentoring and without proper training," Johnson said.
The CIA has suffered one crisis after another since its inception in the middle of the last century. One of its high points was its claim to have contributed to winning the cold war, but a low point was reached with the failure to prevent 9/11. Last year the Obama administration revealed details of waterboarding and other torture, and there were newspaper reports about links between the CIA and the private contractor Blackwater.
Pat Lang, a veteran of military intelligence, who was head of the analysis and clandestine human intelligence for the Defence Intelligence Agency, echoed Johnson's criticism of the Khost operation.
"A number of basic rules were violated. One that comes to mind is you never trust foreign agent assets," he said.
"I think it is a very big crisis. It shows that the level of skill in operations has declined so far that they are a menace to themselves," said Lang.
According to Lang, one of the major flaws in intelligence gathering was the failure of the Bush administration after 9/11 to put one agency in overall charge.
Gary Berntsen, a former senior CIA officer who served in the Middle East, said a hiring freeze under President Clinton had left the CIA with a lack of experienced senior intelligence gatherers.
"When a bunch of guys like me retired all at 50, there's a gap. And now we've got a lot of inexperienced people coming on who are being forced into senior positions in the field before they're ready."
But he disputed suggestions that the bombing at the base in Khost indicated systemic problems within the agency. "The agency deals with these sorts of things every single day successfully, and this is an individual case where they failed. They got beat on this case, they got beat bad ... My heart goes out to the families, but this does not indicate that the agency is in crisis in any way."
He also criticised Obama's selection of Leon Panetta to head the CIA, noting his lack of intelligence experience. "I'm sure he's learning every day, but you don't need to be learning on the job. For anyone to say it doesn't have an effect is dishonest."