He was Washington's favourite Iraqi, a prized intelligence source and a dream post-Saddam leader. Now his former CIA masters are rubbishing him, saying he helped Iran trick the US into war. No one, says Iraq expert Andrew Cockburn, should be surprised

In the aftermath of last week's raid by Iraqi's police and US forces on the elegant Baghdad mansion currently inhabited by Ahmad Chalabi (it actually belongs to his sister), his angry spokesman cited as evidence of the intruders' barbarity the fact that they seized "even his holy Koran - his personal holy Koran was taken as a document".

If reports that US intelligence has at last woken up to Chalabi's Iranian connection are true, then taking his Koran may have been more than personal spite, since, according to a former close associate, the Pentagon's erstwhile favorite Iraqi owns one bearing an affectionate inscription from the late Ayatollah Ruhollah Khomeini himself, evidence of how deep and long standing a relationship he has had with the Islamic Republic. "Ahmad helped Iran very much during the war [the Iran/Iraq war of the 1980s]," recalls this former associate and friend. "Khomeini was very pleased, and he sent him a copy of the Holy Koran inscribed 'To My Son Ahmed.'"

Another former colleague who, like so many, has subsequently fallen out with Chalabi, explains that, "It was during the Iraq/Iran war that Ahmad discovered the value of information as a commodity, that it was something you could trade, buy and sell, and he has used that ever since."

Chalabi has vehemently rejected allegations that he was operating on behalf of Tehran as "a lie a fib and silly". He has accused the CIA director George Tenet of conducting a smear campaign against him. During that war, Chalabi was resident in Amman, busily trading the Petra bank into a bankruptcy that eventually almost collapsed the Jordanian economy. But he was also endearing himself to US officials in Amman with the quality of his intelligence on the war. "I could get an answer on any question about what was going on in 10 minutes out of Ahmad," recalls one former US ambassador with affection.

By the end of 1991, Chalabi was deep in business with the CIA, following up on an opportunity he had scented early on. "The United States is prepared to allocate substantial sums for the Iraqi opposition," he confided to an opposition activist soon after the 1991 war. "We should go for that money." The Langley spooks liked what they saw in him - his efficiency, his readiness to tell interlocutors what they wanted to hear, not to mention the source of his cash. The presumption that Chalabi's activities were funded by money embezzled from the Petra bank ensured that few initially suspected his true sponsor: the CIA. (Chalabi has always maintained that the charges brought against him in relation to the Petra bank affair were politically motivated.) His new handlers showed no sign of being bothered about his links to Iran, not even after he moved to the mountains of Iraqi Kurdistan in 1992 and recruited a Shia Kurd named Arras Karim Habib to organise his security and intelligence.

"Arras was brought up in Iran. He was always an Iranian agent," insists a fellow veteran of those days in the mountains, "a double agent really, for both the Iranians and the Americans, but always for the Iranians first." "The CIA knew that Arras was an Iranian agent from the early 90s," says Bob Baer, a longtime covert operator who, for a period in the mid 1990s, was the senior CIA official posted to northern Iraq. "They were really pissed about it, pissed about Chalabi's dealing with the Iranians in general, like the time he forged a letter from the National Security Council saying that the NSC had authorised the assassination of Saddam Hussein and left it on his desk for the Iranians to find." Meanwhile, Baer discovered that while the CIA was paying Chalabi an extortionate rent, the Iranian intelligence contingent in the mountain town of Salahaddin, where the INC was based, were enjoying their quarters gratis, courtesy of Chalabi.

The CIA may have thought that at least Chalabi was serving his two masters to the same end: opposition to the regime of Saddam Hussein. But an obscure episode in the hunt for Saddam's banned weapons during those years points to the Iranians' use of Chalabi in something far more serious: the manipulation of US foreign policy through the production of fake intelligence. It was an operation that may ultimately have helped bring about the invasion and occupation of Iraq.

Early in the winter of 1994, Chalabi had a visitor from Baghdad named Khidir Hamza, who announced himself as a senior member of Saddam's nuclear weapons team with much to reveal about the ongoing bomb programme being pursued by the dictator under the noses of the UN inspection teams. Chalabi in turn handed him to one of the resident spooks, who contacted Langley to see if they were interested in sponsoring this defector. After quizzing Hamza over the shortwave radio, a CIA nuclear expert at headquarters concluded that Hamza had nothing to offer and declined to assist his passage to the US.

It was a wise decision. As veterans of the Iraqi bomb program have subsequently revealed, Hamza grossly exagerrated his nuclear bombmaking credentials while downplaying the role his Ba'athist connections had played in advancing his scientific career. Imad Khadduri, the Iraqi nuclear physicist in charge of all documentation for the bomb project later scathingly reported that Hamza had a "deep inner fear of radiation" which "prevented him from ever entering the reactor hall or touching any scientific gadgets, probably due to his continual fear of an electric jolt that he experienced as a child". This paranoia, a significant drawback for a nuclear weapons builder, meant that his work was confined to theoretical research, well away from any actual experimentation. "He did not," says Khadduri, "even remotely, get involved in any scientific research, except for journalistic articles, dealing with the fission bomb, its components or its effects."

Cultivating a relationship with Hussein Kamal, Saddam's loutish cousin who was for a period all powerful as head of the weapons programmes and much else beside, Hamza nevertheless served briefly as head of the bomb design team in 1987, before being relegated to a makework job before being sacked, according to Khadduri, for filching air conditioners from the office. He then sank into obscurity before surfacing in Kurdistan in 1994.

Even though the nuclear experts in Langley rejected him as an intelligence source, documents provided by him found their way to the International Atomic Energy Agency's teams investigating the Iraqi bomb programme. Early in 1995, an IAEA "Action Team" descended on the offices of the Iraqi nuclear programme in Baghdad. They had with them a 20-page document that apparently originated from inside "Group 4," the Iraqi government department that had been responsible for designing Saddam's nuclear bomb. The stationery, page numbering, and stamps all appeared authentic, according to one senior member of the Iraqi bomb team.

"It was a 'progress report,'" he recalls, "about 20 pages, on the work in Group 4 departments on the results of their continued work after 1991. It referred to results of experiments on the casting of the hemispheres [ie the bomb core of enriched uranium] with some crude diagrams." As evidence that Iraq was successfully pursuing a nuclear bomb in defiance of sanctions and the inspectors, it was damning. However, after a thorough investigation, the IAEA concluded that the document, as one official recently confirmed to me by email, was "determined not to be authentic." The official later told me on the phone that the document originated with Khidir Hamza, a point confirmed by an Action Team veteran.

The IAEA had an excellent source to confirm that the document was forged - none other than Hamza's old boss, Hussein Kamal. In August, 1995, Kamal, until then considered to be the second most powerful man in Iraq, defected to Jordan. Soon after his arrival, the former Iraqi weapons supremo spoke freely to senior UN inspection officials. In one session, the IAEA's Professor Maurizio Zifferero showed Kamal the document. Kamal, according to the transcript, immediately recognised it as a forgery, a view in which the official concurred, adding that "Dr Khidir Abdul Abbas Hamza is related to this document".

"He is a professional liar," said Kamal. "He worked with us, but he was useless and was always looking for promotions. He consulted with me but could not deliver anything."

Kamal suggested that the document might have been faked by Egyptian intelligence, but the Iraqi scientists had found clues pointing in another direction. Some of the technical descriptions used terms that would only be used by an Iranian. "Most notable," says Khadduri, "was the use of the term 'dome' - 'Qubba' in Iranian, instead of 'hemisphere' - 'Nisuf Kura' in Arabic." In other words, the document had to have been originally written in Farsi by an Iranian scientist and then translated into Arabic.

The Iranians, it seemed, were supplying fake information designed to show that Saddam was pursuing his efforts to build weapons of mass destruction, and therefore the onerous UN economic sanctions, despite their civilian toll, should be kept in place.

There is no evidence that Hamza, who eventually found his way to the United States and a lucrative career as "Saddam's Bombmaker," ever visited Iran. But, while roosting at Chalabi's headquarters in northern Iraq, he had been in close proximity to many Iranian agents, including of course (according to the CIA) Arras Karem Habib.

In subsequent years, of course Chalabi produced a stream of defectors attesting to Saddam's iniquitous weapons initiatives. Though their stories turned out to be utterly fallacious, they had a superficial credibility, the product, as one former UN inspector told me, of "very skillful coaching".

Chalabi was not shy about his Iranian intelligence connections. "When I met him in December 1997 he said he had tremendous connections with Iranian intelligence," recalls Scott Ritter, the former UN weapons inspector. "He said that some of his best intelligence came from the Iranians and offered to set up a meeting for me with the head of Iranian intelligence." Had Ritter made the trip (the CIA refused him permission), he would have been dealing with Chalabi's chums in Iranian Revolutionary Guard intelligence, a faction which regarded Saddam with a venomous hatred spawned both by the bloody war of the 1980s and the Iraqi dictator's continuing support of the terrorist Mojaheddin Khalq group.

The CIA knew, as Bob Baer makes clear, that Chalabi had close Iranian connections. They knew that before the war he had meetings with Iranian intelligence officials, including the Revolutionary Guard intelligence official responsible for Iraq, General Sirdar Jaffari. But whatever their distaste for their former protege, they were unable to counter his influence and favour with the neo-conservatives clustered in the Pentagon and Vice-President Cheney's office who were beguiled by Chalabi.

Only in recent weeks has Chalabi's increasingly disruptive performance in Baghdad, denouncing the efforts of UN envoy Lakhdar Ibrahim to craft a post June 30 settlement, goaded the administration into abandoning their friend, permitting the raid on his house and the leaking of reports that he has been funneling American secrets to Tehran. After serving, or using, two masters for so long, Chalabi is now linked only with Iran, a position which may serve him well in garnering support among the Iraqi Shia masses.

Baer, who served in the CIA outpost in the mid 1990s, says that "a lot of people in the CIA believe that the Iranians used Chalabi, and or Arras, to manipulate us into a war. Maybe they just thought they were steering us to keep up the pressure on Saddam, keeping him under sanctions and no fly zones, never dreaming that he would actually get the US to go to war and put the US army right on the Iranian border. It's the law of unintended consequences."

· Andrew Cockburn is co-author with Patrick Cockburn of Saddam Hussein: An American Obsession, published by Verso Books.