As the CIA director, George Tenet, arrived at the Senate yesterday to give secret testimony on the Niger uranium affair, it was becoming increasingly clear in Washington that the scandal was only a small, well-documented symptom of a complete breakdown in US intelligence that helped steer America into war.

It represents the Bush administration's second catastrophic intelligence failure. But the CIA and FBI's inability to prevent the September 11 attacks was largely due to internal institutional weaknesses.

This time the implications are far more damaging for the White House, which stands accused of politicising and contaminating its own source of intelligence.

According to former Bush officials, all defence and intelligence sources, senior administration figures created a shadow agency of Pentagon analysts staffed mainly by ideological amateurs to compete with the CIA and its military counterpart, the Defence Intelligence Agency.

The agency, called the Office of Special Plans (OSP), was set up by the defence secretary, Donald Rumsfeld, to second-guess CIA information and operated under the patronage of hardline conservatives in the top rungs of the administration, the Pentagon and at the White House, including Vice-President Dick Cheney.

The ideologically driven network functioned like a shadow government, much of it off the official payroll and beyond congressional oversight. But it proved powerful enough to prevail in a struggle with the State Department and the CIA by establishing a justification for war.

Mr Tenet has officially taken responsibility for the president's unsubstantiated claim in January that Saddam Hussein's regime had been trying to buy uranium in Africa, but he also said his agency was under pressure to justify a war that the administration had already decided on.

How much Mr Tenet reveals of where that pressure was coming from could have lasting political fallout for Mr Bush and his re-election prospects, which only a few weeks ago seemed impregnable. As more Americans die in Iraq and the reasons for the war are revealed, his victory in 2004 no longer looks like a foregone conclusion.

The White House counter-attacked yesterday when new chief spokesman, Scott McClellan, accused critics of "politicising the war" and trying to "rewrite history". But the Democratic leadership kept up its questions over the White House role.

The president's most trusted adviser, Mr Cheney, was at the shadow network's sharp end. He made several trips to the CIA in Langley, Virginia, to demand a more "forward-leaning" interpretation of the threat posed by Saddam. When he was not there to make his influence felt, his chief of staff, Lewis "Scooter" Libby, was. Such hands-on involvement in the processing of intelligence data was unprecedented for a vice-president in recent times, and it put pressure on CIA officials to come up with the appropriate results.

Another frequent visitor was Newt Gingrich, the former Republican party leader who resurfaced after September 11 as a Pentagon "consultant" and a member of its unpaid defence advisory board, with influence far beyond his official title.

An intelligence official confirmed Mr Gingrich made "a couple of visits" but said there was nothing unusual about that.

Rick Tyler, Mr Gingrich's spokesman, said: "If he was at the CIA he was there to listen and learn, not to persuade or influence."

Mr Gingrich visited Langley three times before the war, and according to accounts, the political veteran sought to browbeat analysts into toughening up their assessments of Saddam's menace.

Mr Gingrich gained access to the CIA headquarters and was listened to because he was seen as a personal emissary of the Pentagon and, in particular, of the OSP.

In the days after September 11, Mr Rumsfeld and his deputy, Paul Wolfowitz, mounted an attempt to include Iraq in the war against terror. When the established agencies came up with nothing concrete to link Iraq and al-Qaida, the OSP was given the task of looking more carefully.

William Luti, a former navy officer and ex-aide to Mr Cheney, runs the day-to-day operations, answering to Douglas Feith, a defence undersecretary and a former Reagan official.

The OSP had access to a huge amount of raw intelligence. It came in part from "report officers" in the CIA's directorate of operations whose job is to sift through reports from agents around the world, filtering out the unsubstantiated and the incredible. Under pressure from the hawks such as Mr Cheney and Mr Gingrich, those officers became reluctant to discard anything, no matter how far-fetched. The OSP also sucked in countless tips from the Iraqi National Congress and other opposition groups, which were viewed with far more scepticism by the CIA and the state department.

There was a mountain of documentation to look through and not much time. The administration wanted to use the momentum gained in Afghanistan to deal with Iraq once and for all. The OSP itself had less than 10 full-time staff, so to help deal with the load, the office hired scores of temporary "consultants". They included lawyers, congressional staffers, and policy wonks from the numerous rightwing thinktanks in Washington. Few had experience in intelligence.

"Most of the people they had in that office were off the books, on personal services contracts. At one time, there were over 100 of them," said an intelligence source. The contracts allow a department to hire individuals, without specifying a job description.

As John Pike, a defence analyst at the thinktank GlobalSecurity.org, put it, the contracts "are basically a way they could pack the room with their little friends".

"They surveyed data and picked out what they liked," said Gregory Thielmann, a senior official in the state department's intelligence bureau until his retirement in September. "The whole thing was bizarre. The secretary of defence had this huge defence intelligence agency, and he went around it."

In fact, the OSP's activities were a com plete mystery to the DIA and the Pentagon.

"The iceberg analogy is a good one," said a senior officer who left the Pentagon during the planning of the Iraq war. "No one from the military staff heard, saw or discussed anything with them."

The civilian agencies had the same impression of the OSP sleuths. "They were a pretty shadowy presence," Mr Thielmann said. "Normally when you compile an intelligence document, all the agencies get together to discuss it. The OSP was never present at any of the meetings I attended."

Democratic congressman David Obey, who is investigating the OSP, said: "That office was charged with collecting, vetting and disseminating intelligence completely outside of the normal intelligence apparatus. In fact, it appears that information collected by this office was in some instances not even shared with established intelligence agencies and in numerous instances was passed on to the national security council and the president without having been vetted with anyone other than political appointees."

The OSP was an open and largely unfiltered conduit to the White House not only for the Iraqi opposition. It also forged close ties to a parallel, ad hoc intelligence operation inside Ariel Sharon's office in Israel specifically to bypass Mossad and provide the Bush administration with more alarmist reports on Saddam's Iraq than Mossad was prepared to authorise.

"None of the Israelis who came were cleared into the Pentagon through normal channels," said one source familiar with the visits. Instead, they were waved in on Mr Feith's authority without having to fill in the usual forms.

The exchange of information continued a long-standing relationship Mr Feith and other Washington neo-conservatives had with Israel's Likud party.

In 1996, he and Richard Perle - now an influential Pentagon figure - served as advisers to the then Likud leader, Binyamin Netanyahu. In a policy paper they wrote, entitled A Clean Break: A New Strategy for Securing the Realm, the two advisers said that Saddam would have to be destroyed, and Syria, Lebanon, Saudi Arabia, and Iran would have to be overthrown or destabilised, for Israel to be truly safe.

The Israeli influence was revealed most clearly by a story floated by unnamed senior US officials in the American press, suggesting the reason that no banned weapons had been found in Iraq was that they had been smuggled into Syria. Intelligence sources say that the story came from the office of the Israeli prime minister.

The OSP absorbed this heady brew of raw intelligence, rumour and plain disinformation and made it a "product", a prodigious stream of reports with a guaranteed readership in the White House. The primary customers were Mr Cheney, Mr Libby and their closest ideological ally on the national security council, Stephen Hadley, Condoleezza Rice's deputy.

In turn, they leaked some of the claims to the press, and used others as a stick with which to beat the CIA and the state department analysts, demanding they investigate the OSP leads.

The big question looming over Congress as Mr Tenet walked into his closed-door session yesterday was whether this shadow intelligence operation would survive national scrutiny and who would pay the price for allowing it to help steer the country into war.

A former senior CIA official insisted yesterday that Mr Feith, at least, was "finished" - but that may be wishful thinking by a rival organisation.

As he prepares for re-election, Mr Bush may opt to tough it out, rather than acknowledge the severity of the problem by firing loyalists. But in that case, it will inevitably be harder to re-establish confidence in the intelligence on which the White House is basing its decisions, and the world's sole superpower risks stumbling onwards half-blind, unable to distinguish real threats from phantoms.