The attack on the World Trade Center on September 11, 2001, remains the largest terrorism event to have occurred on American soil. Compounding the tragedy of that day is the fact information existed that could have stopped the events of 9/11. It's almost impossible to pull something of that size and magnitude off without leaving some kind of a trail, and there were clues about what was about to happen.
9/11 wasn't even the first time the World Trade Center was targeted, and intelligence agencies like the FBI and CIA had already been investigating the possibility of a follow-up attack. Unfortunately, the two agencies' relationship had been strained for decades, and they failed to work together in the months leading up to the attack. Their petty feud ultimately helped lead to the events of 9/11.
On July 10, 2000, the FBI passed around a "Phoenix memo" from special agent Kenneth Williams that begged the bureau to investigate Middle Eastern men that appeared to be training in several American flight schools. The FBI not only didn't act on it, but they also didn't even really try to share it with the CIA. The CIA claimed that if they'd known about this memo, they would have done something about it. Of course, the FBI claimed they did share it, and the CIA ignored it.
As John P. O'Neill - the FBI's foremost expert in Al Qaeda and Osama Bin Laden - was working to learn more about terrorists after the bombing of the USS Cole in 2000, he and his team continually requested more information from the CIA. In nearly every instance, they were ignored. Although O'Neill was learning more about other terrorist plots, he was never told that the CIA already knew there were Al Qaeda members in America. If the FBI had known that, they could have moved in, taken them, and questioned them about their plans leading up to 9/11. But they never knew, despite O'Neill's efforts, and the terrorists continued their planning.
These terrorists were two of the hijackers of Flight 77.
One of John P. O'Neill's greatest strengths as an FBI agent was promoting cooperation between the FBI and the CIA. Over the course of his career, he managed to utilize the resources of each organization to further his own goals of stopping terrorism in the world. Once, he even planned a retreat with agents from both teams. Unfortunately, his particularly aggressive style in negotiations eventually rubbed people the wrong way.
To keep the flow of information open, O'Neill sent a close associate, Mark Rossini, to work at the CIA. The goal was to have him share information the CIA had with the FBI so everybody would be equally informed. Unfortunately, the station chief, Richard Blee, hated this arrangement and would often block messages intended for O'Neill.
Both the CIA and FBI attempted to blame each other for the attacks in the aftermath of 9/11. They used leaked information to make their respective cases. Ultimately, these leaks tended to mostly point to a lack of coordination and communication between the agencies.
For example, nearly a year after the attacks, news came out that the CIA had warned the president of a possible Al Qaeda attack on the White House. However, they didn't share this information with the FBI. This is important, because anything domestic technically falls under the purview of the FBI, and they don't appear to have been warned or tipped at all.