"We did not know an attack was coming because, for nearly a decade, our government had blinded itself to its enemies." So said Attorney General John Ashcroft in his April 13 testimony to the 9/11 commission. He accused commission member Jamie Gorelick of "flawed legal reasoning" in a 1995 memorandum in which, as Bill Clinton's deputy attorney general, she had helped raise a legalistic "wall [that] left intelligence agents afraid to talk with criminal prosecutors or agents."

One would hardly know from Ashcroft's testimony that the foundation of this "wall"—shorthand for the thicket of legal rules restricting coordination between intelligence agents and criminal investigators—predated the Clinton administration. Or that the wall was a logical response to judicial rulings that the Justice Department approved under Gorelick's Republican predecessors, in an effort to prevent the use of foreign intelligence wiretaps to circumvent Fourth Amendment restrictions on criminal investigations. Or that before 9/11, Ashcroft himself had done very little to change it.

Putting aside Ashcroft's political bluster, however, he has a very valid complaint that this wall, which the Clinton administration made higher and harder to breach, was a major hindrance to pre-9/11 counter-terrorism efforts. Let's take a break from the Clinton-Bush blame game for long enough to revisit how the wall was built—and why, after 9/11, it was torn down. This history should give pause to those who so readily segue from condemning the government's failure to stop 9/11 to trashing provisions of the USA PATRIOT Act that may help stop future attacks.

The wall was one of many pre-PATRIOT Act surveillance rules adopted during the post-Nixon, post-J. Edgar Hoover era, back when many of us feared government spying more than we did terrorist massacres. These rules were not responsible for all, or even most, of the government failures that left us exposed to 9/11. But they do help explain some of those failures.

Take the government's failure to find two of the eventual 9/11 hijackers, about whom the CIA had inexcusably delayed telling the FBI until August 2001. By that time, they had entered the country and were living openly in San Diego. The FBI did not find the two in time and, in the words of The New York Times, "It is not clear that anyone at the bureau tried very hard."

But at least one FBI criminal investigator did try, only to be blocked by his superiors' fear of running into the wall and thus running afoul of the special Foreign Intelligence Surveillance Court, known as the FISA court, which had rebuked others for concealing the prosecutorial purpose underlying certain wiretap applications.

"Someday, someone will die," this agent had written to FBI headquarters 13 days before 9/11, "and—wall or not—the public will not understand why we were not more effective and throwing every resource we had at certain 'problems.... ' The biggest threat to us now, UBL [Osama bin Laden], is getting the most 'protection.' "

Critics of the CIA and the FBI argue that the legal wall clearly did not cause the CIA's delay in telling the FBI about these two hijackers and—if properly interpreted—should have presented no impediment to pursuit of these two men once the FBI knew about them. That may be true as a matter of legal technicalities. But it ignores the real-world impact of saddling terrorism investigators with unduly complex legal restrictions enforced by draconian discipline for any officials who guess wrong about what they can and cannot do. For many, the watchword became: When in doubt, don't. This reinforced the culture of insularity at rival agencies that were reluctant to share information in any event.

The so-called wall originated in a succession of federal court decisions interpreting—or misinterpreting, it now appears—the Foreign Intelligence Surveillance Act of 1978, and seeking to avoid any conflict between FISA and the Fourth Amendment. Presidents had previously claimed inherent authority to use warrantless wiretaps in investigations of suspected foreign-intelligence agents and terrorists. FISA required the Justice Department to seek special judicial warrants. At the same time, the law made such warrants somewhat easier to obtain and longer-lasting than ordinary criminal warrants.

A FISA warrant application must show "probable cause" to believe that the target is a foreign "agent," defined to include U.S. citizens only if there is evidence implicating them in "sabotage or international terrorism," which are crimes; activities "in preparation therefor"; or "clandestine intelligence-gathering activities [that] involve or may involve a [criminal] violation." Ordinary criminal warrants require probable cause that actual criminal activity has occurred. FISA also created the highly secretive FISA court, which now has 11 judges, to handle Justice Department applications for FISA warrants; and the three-judge Foreign Intelligence Surveillance Court of Review, known as the FISA review court, to hear any government appeals.

In the 1980s and 1990s, several other federal courts around the country, and eventually the FISA court, ruled that the government could not seek FISA wiretaps primarily for the purpose of prosecution, even for crimes of espionage or terrorism. The Justice Department adopted this interpretation in the 1980s. The court decisions presented Justice with a dilemma: While FISA's stated purpose was to "protect against" foreign spies, the most direct way to do that—locking them up on criminal charges—risked judicial rebuke. And even agents whose primary purpose in seeking a warrant was not prosecution could be mistakenly accused of having concealed such a purpose if they later came across evidence of crime and turned it over to prosecutors.

It was to guide investigators through this judicially created maze, and to avoid running afoul of the courts, that in 1995, Gorelick developed highly detailed curbs on contacts between intelligence and law enforcement officials. These instructions, portions of which the FISA court incorporated into some of its rulings, were enforced quite strictly by the career Justice Department officials who handled FISA warrant applications. Thus had the wall become a formidable barrier to coordination between intelligence and law enforcement officials.

The 9/11 attacks put a spotlight on the need for better coordination and information-sharing. So Congress—in the PATRIOT Act's most important provision—sought to tear down the wall by amending FISA. Whenever a "significant" part of the purpose is intelligence-gathering, the amendment specified, the government can seek a FISA warrant. The evident purpose was to allow for FISA warrants even when prosecution is the primary purpose.

But the FISA court suggested the opposite in May 2002, in a 7-0 decision that virtually ignored the PATRIOT Act. It stressed that prosecutors may not advise intelligence officials on FISA matters and that, to ensure compliance, official Justice Department "chaperones" must attend whenever criminal and intelligence investigators meet. Ashcroft appealed. And in November 2002, the FISA review court tore down both the wall and the legal analyses on which it was based.

The review court ruled that the government can seek FISA warrants regardless of whether its primary purpose is gathering pure intelligence or obtaining evidence for criminal prosecutions, as long as the alleged crimes are related to terrorism or espionage. The court acknowledged that this holding was not clearly supported by the Supreme Court's Fourth Amendment precedents, some of which suggest that any search or wiretap for which the primary purpose is prosecution must be based on probable cause to suspect that an actual crime has been committed. But the court concluded, quite persuasively, that using FISA's somewhat lower standard in cases that may "involve the most serious threat our country faces" was "reasonable" within the meaning of the Fourth Amendment.

Some of the same people who have deplored the lack of coordination between terrorism investigators were quick to attack the FISA review court's decision as a "misguided" grant to the government of "broad new authority ... to wiretap phone calls, intercept mail, and spy on Internet use of ordinary Americans," as The New York Times editorialized. The American Civil Liberties Union added that it would "affect every American's privacy rights."

Such are the alarums of those who have not learned from the past. Let's hope they are not condemned to repeat it.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.