In early 2002 the CIA took custody of captured Al Qaeda commander Ibn Shaykh Al Libi. The agency loaned him to the Egyptians whom, under torture, he told of extensive ties between Al Qaeda and Saddam Hussein's Iraq. The CIA reclaimed its prisoner and reported the Egyptians' findings to the White House, which used them to justify invading Iraq. Al Libi subsequently recanted, claiming his testimony had been coerced, and in March 2004, a year after American tanks rumbled into Baghdad, the CIA withdrew its support for his assertions.

In his memoir, Present at the Creation, former Secretary of State Dean Acheson expressed his misgivings about the creation of the CIA in 1947. "I had the gravest forebodings about this organization and warned the President that as set up neither he, the National Security Council, nor anyone else would be in a position to know what it was doing or to control it." In 1991 and again in 1995, Senator Daniel Patrick Moynihan introduced bills to abolish the CIA and assign its functions to the State Department, which is what Acheson and his predecessor, George Marshall, had advocated. But Moynihan's proposal was treated as evidence of his eccentricity rather than of his wisdom and never came to a vote.

It's time to reconsider Moynihan's proposal, or least the reasoning behind it. Al Libi's case, combining gross incompetence with the violation of international law, shows that the problems Moynihan and others cited have, if anything, gotten worse under George W. Bush. The intelligence reform act passed last year didn't address them; and the current director Porter Goss appears oblivious to them. These problems have for years plagued the two main functions of the agency: intelligence gathering and covert action.

The CIA was established to prevent unanticipated disasters, such as the Japanese attack on Pearl Harbor, but it has repeatedly failed to warn the White House of looming threats. It missed the North Korean invasion of the South in 1950, and the Chinese entry into the war that fall; Israel, France, and Great Britain's attack on the Suez Canal and Egypt in 1956; the Soviet invasion of Czechoslovakia in 1968; the Shah of Iran's ouster in 1979; the Soviet invasion of Afghanistan that year; the Iraqi invasion of Kuwait in 1990; the Indian nuclear tests in 1998 ("We didn't have a clue," CIA director George Tenet remarked afterwards); the attack on the World Trade Center in 1993; the bombing of American military barracks in Saudi Arabia in 1996 and of U.S. embassies in Africa in 1998; the attack on the USS Cole in 2000; and of course the attack on the World Trade Center and Pentagon in September 2001.

The agency has been equally inept at analyzing current situations. The CIA consistently overestimated Soviet military and economic strength. In 1986 agency deputy director Robert Gates insisted to Secretary of State George Schultz, "The Soviet Union is a despotism that works." In the early 1960s the CIA wildly misjudged opposition in Cuba to Fidel Castro even in the face of public accounts to the contrary. In the late '80s it underestimated Saddam Hussein's chemical, biological, and nuclear weapons programs. From 1992 to 2004, it fuelled illusions that Saddam still had these programs.

Of course, the CIA did get some things right. It predicted, for instance, the exact length of the Six Day War in 1967. But many of the things it got wrong had disastrous consequences. The failure of the Bay of Pigs invasion of Cuba in 1961, because of faulty CIA intelligence, led to the Cuban missile crisis the next year--probably the closest the United States and the Soviet Union got to a nuclear war. Mistaken intelligence during the Balkan war led to American planes destroying the Chinese embassy in Belgrade. And the WMD errors in Iraq justified a war that might otherwise not have taken place.

Then there is the CIA's record of covert action. The agency was initially designed to gather information--whether through analysis or spying. But in the early '50s, it took upon itself a new function: serving as a secret army to topple governments that were deemed hostile to American interests. The full list is not public, but countries targeted include Iran, Syria, Angola, Guatemala, Cuba, South Vietnam, Chile, Angola, Nicaragua, Panama, and, of course, Afghanistan and Iraq. Some of these efforts were initially successful, but they have often had unwelcome consequences. In 1978, for instance, the secular and Islamic forces that took over Iran cited CIA support for the coup in 1953 that restored the Shah to explain their hostility to the United States.

In almost all these cases--except, perhaps, during the reign of William Casey--the CIA was acting under official White House supervision. And some of the CIA's intelligence failures can also be laid at the White House door. Without pressure from the vice president's office and the Pentagon, for instance, the CIA might not have validated the Bush administration's claims that Iraq possessed WMD.

But as Moynihan argued in his last book, Secrecy, there is a way in which the CIA's peculiar structure and function has encouraged errors and magnified their importance. Moynihan described a "culture of secrecy" created by the CIA and other intelligence agencies. This culture produced a distinction between insiders and outsiders; and outsiders, no matter their experience or expertise, couldn't possibly know with the same degree of certainty as insiders what was going on in a foreign country. For instance, the CIA ignored an extensive poll taken in Cuba just prior to the Bay of Pigs invasion by political scientist Lloyd A. Free that demonstrated widespread support for Fidel Castro. And prior to the Iraq war, the agency insisted that U.N. inspectors who reported an absence of WMD were being duped by Iraqis.

The distinction between insiders and outsiders not only insulated CIA analysts from obvious questions that outsiders without security clearances might ask; it also bestowed a special status upon the findings that were produced. Their very secrecy made them appear more likely to be true. Moynihan recounted how government officials gave special credence to the Gaither Report, which in 1957 wrongly predicted Soviet economic and military superiority, because it was classified.

In such a culture, dissenters risk isolation and even losing their clearances. That, in turn, serves to reinforce conventional wisdom on any given topic. Former CIA Director Stansfield Turner's account of why the agency was wrong about the Soviet economy could easily apply to the agency's deliberations in 2002 over whether Iraq was importing aluminum tubes for making nuclear bombs. "If some individual CIA analysts were more prescient than the corporate view," Turner wrote, "their ideas were filtered out in the bureaucratic process; and it is the corporate view that counts because that is what reaches the president and his advisers."

The culture of secrecy also makes those at the top of intelligence agencies highly susceptible to political pressure from above. Without a public community to sustain contrary conclusions, they dare not risk defying the expectations of those at whose discretion they serve. Tenet appears to have been particularly eager to please his superiors--whether in insisting that the Al Shifa factory in Sudan made chemical weapons or declaring that proof of Iraqi WMD was a "slam dunk."

Finally, the culture of secrecy has created common ground between CIA directors who have sought a special niche for their organization and presidents who have wanted to undertake foreign policies that would violate domestic or international law. The CIA has functioned as the White House's secret army, which is not subject to the same scrutiny as the regular armed forces. The CIA has tried to assassinate foreign leaders, mined harbors, and, most recently, tortured prisoners. If Congress had openly debated these actions, they would not have been approved. Some eventually caused an international uproar that undermined the legitimacy of American foreign policy.

Moynihan certainly understood the problem; but what about his solution? He proposed moving the CIA's functions into the State Department, where they would be more subject to international law and congressional oversight. But questions about this proposal abound. Would the State Department also perform covert operations, and not simply spying, overseas? What would happen to the intelligence agencies within the Pentagon and to the National Security Agency (which under George W. Bush appears to have taken on some of the domestic spying functions that were denied the CIA after Watergate)? Who would oversee them? The answers to these questions are unclear. What is clear is that the CIA is broken. And to repair it, we may have to start from scratch.

John B. Judis is a senior editor at TNR and a visiting scholar at the Carnegie Endowment for International Peace.