US spy agencies still live under the shadow of disastrous intelligence failures that paved the way for the Iraq war, and now face a crucial test as they track Iran's nuclear program.
In the run-up to the invasion of Iraq 10 years ago, the CIA and other intelligence services confidently asserted that Saddam Hussein's regime had stockpiles of weapons of mass destruction.
Their findings backed up the White House's strongly-held conviction that Saddam was a menace who had to be toppled by force.
But it turned out the intelligence community was "dead wrong in almost all of its pre-war judgments about Iraq's weapons of mass destruction," according to an official inquiry, the Silberman-Robb report.
The spy services failed to collect solid information, botched their analysis and reached conclusions based on flawed assumptions instead of evidence, making it "one of the most public -- and most damaging -- intelligence failures in recent American history," the 2005 report said.
Despite a desperate search for Saddam's arsenal after the 2003 invasion, no weapons of mass destruction (WMD) were found, puncturing the whole case for the US-led war and igniting global outrage.
"This thing has done us lasting damage," said Brian Jenkins, a terrorism expert at the RAND Corporation think tank.
"It really significantly erodes the credibility of US intelligence in these areas," said Jenkins, a former Green Beret who has advised the government on security.
Since that humiliating episode, the country's 16 spy services have sought to bolster intelligence-gathering efforts around the world and added vetting procedures to their analysis to avoid any repeat of the Iraq experience, former CIA officials and analysts said.
"Lessons have been learned," said Paul Pillar, a former senior CIA analyst who oversaw intelligence on the Middle East.
Soon after the debacle over Saddam's weapons programs, the CIA and other agencies took steps to improve the screening of informers and added measures "to hold even senior intelligence managers' feet to the fire with regard to vouching for the credibility of source material," Pillar told AFP.
Two separate inquiries, one commissioned by the White House and another by Congress, blasted the intelligence services for failing to dig up inside information about the regime's weapons and for failing to question an array of assumptions.
And in its own internal review, only recently declassified, the CIA found that it had badly misread Saddam's intentions.
But some former spies and lawmakers say the intelligence agencies only deserve a portion of the blame, arguing that former president George W. Bush's deputies had made up their minds to invade regardless of what the spy services reported.
"To say that the whole process was impervious to the political climate is just not credible," Pillar said.
The Bush administration was accused of selecting information that would support their case for war and ignoring intelligence reporting that did not fit their view.
Official inquiries found that intelligence reporting had not been politicized, but the issue remains the subject of bitter debate 10 years on.
Now, American spies are tracking another suspected weapons program -- in Iran.
Unlike with Saddam, UN inspectors have found ample evidence of ambitious uranium enrichment work in Iran.
But the US intelligence community, which believes Tehran has not yet made a decision to build a nuclear weapon, faces a similar challenge in trying to discern the Iranian leadership's intentions.
As Iran expands its uranium enrichment efforts and decision makers in the United States and Israel weigh potential pre-emptive military action, pressure will build on the spy agencies to offer a precise forecast as to how close Tehran could be to securing the bomb.
But such predictions are inherently fraught, and the Iranian regime will have an incentive to exaggerate the potency of its program to discourage any air strikes, analysts said.
"The whole unhappy experience of Iraq no doubt continues to weigh heavily on the minds of whoever happens to be working on the Iranian nuclear program today," said Pillar.