In July 2005, the Los Angeles Police Department caught a group of men who had been robbing gas stations in the area. While investigating, police uncovered something far worse: The gas station hits were bankrolling a terrorist plot to attack National Guard facilities, synagogues, the Israeli consulate and Los Angeles International Airport.
Deputy Chief of Police Michael Downing says the group was "closer to going operational at the time than anyone since 9/11."
Thomas P. O'Brien, the U.S. attorney in Los Angeles, says, "An untold number of lives may have been saved when this terrorist cell was dismantled."
This story is hardly unique: Since Sept. 11, authorities have disrupted more than 20 publicly known plots against domestic U.S. targets, involving dozens of arrests at home and abroad.
Some of these plots are well-known, such as Richard Reid's failed "shoe bombing" in December 2001 and the liquid explosives plot of 2006, when British investigators uncovered a plan to carry bombs on airliners bound for the U.S. Each of those incidents permanently changed airport security protocols.
Then there was the plot to kill U.S. soldiers using assault rifles and grenades at Fort Dix in New Jersey, and the so-called "Lackawanna Six," who pleaded guilty to providing support to Al Qaeda.
But others have passed by with little notice from the general public, as well as critics of government efforts to protect the U.S. from homegrown terror attacks.
Take, for example, Iyman Faris, of Columbus, Ohio, who plotted to destroy the Brooklyn Bridge and was convicted of conspiracy and providing material support for Al Qaeda in 2003.
Later that year 11 men with connections to Al Qaeda were discovered training for jihad in Virginia, using paintball games to simulate battlefield situations. In 2004, James Elshafay and Shahawar Matin Siraj were convicted of planning to bomb New York's Penn Station during the Republican National Convention.
Khalid Sheikh Mohammed, a household name for his role as mastermind of the Sept. 11 attacks, also is known to have prepared little-known strikes against America's tallest building, the Sears Tower in Chicago, as well as the Empire State Building in New York and the U.S. Bank Tower in Los Angeles.
In contrast, Dhiren Barot may not be a familiar name, although some security experts say he should be. An Indian convert to Islam, the Pakistan-based Barot planned a series of ruinous attacks on the U.S. and U.K, including the New York Stock Exchange and the IMF building in Washington, D.C. Barot was caught by British authorities in 2004 and sentenced to life imprisonment for conspiracy to commit murder.
Andrew McCarthy, director of the Center for Law and Counterterrorism at the Foundation for Defense of Democracies, credits much of the success in preventing terrorist attacks at home to the pursuit of enemies overseas.
"There have been days in Iraq and Afghanistan," he says, "where we have killed or captured more terrorists than we did between 1993, when the World Trade Center was attacked, and 2001, when the World Trade Center was destroyed."
"But," McCarthy cautions, "once you get them over here, the rules of the justice system apply."
Successful prosecutions are key to tackling terrorism, but they are not an easy process. Investigators prefer to wait for overwhelming evidence of a terrorist plot, and the timing is difficult.
"It's more dangerous to let things play out because law enforcement is rarely, if ever, in control during these investigations," McCarthy says.
Plots often are disrupted early and as a result, he says, "you don't often have well-developed cases."
But there have been successes, and the courts have been very active since Sept. 11. According to Sean Boyd, a spokesman for the Justice Department, 527 defendants have been charged in terrorism or terrorism-related cases arising from investigations primarily conducted after Sept. 11.
Those cases have resulted in 319 convictions, with an additional 176 cases pending in court.
It's not a perfect record for the Justice Department, but it still is a good one, says McCarthy, who prosecuted and convicted "blind sheikh" Omar Abdel Rahman, ringleader of the 1993 attack on the World Trade Center.
"The batting average is not as high as it was prior to Sept. 11," when most investigations focused on crimes already committed, "but that again is something that we are going to have to accept," McCarthy says.
Allison Barrie, a security and terrorism consultant and a FOXNews.com contributor, agrees on the difficulties. "The evidence [in these trials] is always at its best at the 11th hour," she says. Waiting until the last moment is dangerous, but "you've got to weigh that against actually getting that prosecution."
So far, that strategy has been decisive in preventing another attack on the scale of Sept. 11. "We've just been plain lucky," Barrie says.
And intelligence work hasn't prevented smaller attacks from being carried out.
On July 4, 2002, Hesham Mohamed Hadayet, a 41-year-old Egyptian national, opened fire at the El Al ticket counter at LAX, killing two people before a security guard killed him.
That same ticket counter later would be targeted by those L.A. gas station robbers, a homegrown terrorist group with roots in a California prison.
Homegrown groups often are difficult to detect, and the California cell was not found through careful intelligence work; the LAPD stumbled on them by accident. They might never have been discovered.
"The cliché is true," Barrie says. "Terrorists only have to be lucky once, but the good guys have to be lucky every time."