President Bush's domestic surveillance program isn't the first time that the telecom industry has been caught up in allegations that the government was conducting illegal domestic surveillance. Here's background on their historic relationship.

In 2004, veteran AT&T communications technician Mark Klein ran into problems with the Internet circuit he was responsible for maintaining. He believed the problem was emanating from a secret room in the company's San Francisco operations center. So Klein asked for help from the only co-worker cleared to work in the room.

Klein's colleague led him down to the sixth floor to an orange door labeled 641A -- a room within another room -- where he punched a code into a special lock and opened the doors. Klein peered over rows of servers and high-tech equipment; he later went public with his suspicions that the room was operated by the super-secret National Security Agency (NSA) and that AT&T was diverting the whole flow of Internet traffic in several of its operations centers to the NSA.

If the allegations against AT&T are true it wouldn't be the first time: Telecom companies have surreptitiously handed clients' communications over to government agencies since World War II. But those relationships are now being tested in a lawsuit against AT&T challenging the legality of the alleged activities within the secret room Klein saw.

Operation Shamrock

After World War I, NSA's predecessor, a civilian code-breaking agency known as the Black Chamber, working on behalf of the government, would pick up telegrams every day from the telegraph companies in violation of secrecy protections of the 1912 Radio Communications Act. Eventually exposed and shut down, the relationships regenerated after World War II, this time with the NSA, which was formed secretly by an executive order by President Truman in 1952.

As the NSA quietly grew into the world's biggest intelligence agency, the telecoms similarly expanded in strength and breadth with new technologies and increased communications coverage. One NSA operation, code-named "Shamrock," would become known as the largest intercept affair in U.S. history. "For almost 30 years, copies of most international telegrams originating or forwarded through the United States were turned over to the National Security Agency," announced Sen. Frank Church (D-Idaho), who spearheaded the investigations that exposed Shamrock. The program, he said, "certainly appears to violate section 605 of the Communications Act of 1934 as well as the Fourth Amendment of the Constitution."

L. Britt Snider was the then-30-year-old Congressional investigator who uncovered Shamrock. In September 1975, after what he described as a series of fruitless and "sometimes comical" efforts to penetrate the goliath NSA, he won a breakthrough interview with Louis Tordella, who had just retired as NSA's deputy director. Tordella unveiled the essence of Operation Shamrock: NSA had a secret room in New York City, obtained with the help of the CIA, where each day it would copy international telegrams sent through the three major communication providers: ITT World Communications, Western Union International, and RCA Global.

"We thought initially it was only New York," Snider explained, "But it turns out to be San Francisco, San Antonio, Washington, New York -- all ... their offices that sent international telegrams."

When FRONTLINE asked how the NSA got the companies to hand over telegrams during Shamrock, Snider replied, "They asked." The companies agreed to hand over communications without warrants.

The revelation of Shamrock and other abuses by the Church Committee investigations led Congress to enact the Foreign Intelligence Surveillance Act (FISA) in 1978. FISA set up a special secret court and set of procedures to oversee intelligence agencies' domestic surveillance.

"What Congress said is, 'Phone company, don't hand this stuff over to the government unless you have a warrant or other proper authority,'" explains Cindy Cohn, an attorney at the Electronic Frontier Foundation, which in January 2006 filed suit against AT&T for allegedly illegally handing over its clients' communications to the NSA.

The Bush Administration's "Terrorist Surveillance Program"

For more than 25 years after Shamrock was exposed, no new allegations of domestic spying by the NSA came to light. But on Dec. 15, 2005, The New York Times published an article headlined "Bush Lets U.S. Spy on Callers Without Courts," and a firestorm erupted. According to the article, with the president's authorization, the NSA "monitored the international telephone calls and international e-mail messages of hundreds, perhaps thousands, of people inside the United States without warrants over the past three years." Four days after the story was published, President Bush defended the program at a press conference, maintaining that it was limited to calls between suspected terrorists abroad and individuals inside the U.S.

But when Snider heard the news, he was shocked. "I was surprised that we would ever see this be raised as an issue again, because the FISA had settled that issue," he said.

It is still unclear which telecoms have cooperated with the NSA program. On May 11, 2006, USA Todayreported that the NSA was collecting Americans' phone calls into a massive database and was getting the data directly from AT&T, Verizon and BellSouth; BellSouth and Verizon both disputed the report. In February 2006, the online publication CNET asked large telecommunications and Internet companies about their involvement in the NSA. Fifteen denied involvement and 12, including AT&T, chose not to reply.

Only one major company, Qwest, announced its refusal to turn over any communications to NSA. The attorney of then-CEO Joseph N. Nacchio issued a statement. "In the fall of 2001 … Qwest was approached to permit the government access to the private telephone records of Qwest customers. Mr. Nacchio made inquiry as to whether a warrant or other legal process had been secured in support of that request. When he learned that no such authority had been granted and that there was a disinclination on the part of the authorities to use any legal process, including the special court which had been established to handle such matters, Mr. Nacchio concluded that these requests violated the privacy requirements of the Telecommications Act. Accordingly, Mr. Nacchio issued instructions to refuse to comply with these requests."

The issue is being brought to a head by the EFF's lawsuit against AT&T, which is the first of its kind. In response to the suit, AT&T issued a statement saying "the law does not permit" comment on the NSA allegations. In July 2006, U.S. District Judge Vaughn Walker denied motions from the government and AT&T to dismiss the case. "AT&T cannot seriously contend that a reasonable entity in its position could have believed that the alleged domestic dragnet was legal," Walker wrote. The case is now on appeal before the 9th Circuit.

Neither AT&T nor the NSA would respond to FRONTLINE's request to talk about their alleged relationship.

In April 2007, the Bush administration announced its proposed revisions to FISA; among the proposals was a measure to protect the telecoms. A Justice Department fact sheet is vague, stating, "The proposed legislation includes needed authority both to protect those carriers when they do comply with lawful requests under FISA, and to enable providers to cooperate with authorized intelligence activities." A May 4, 2007 Washington Postarticle includes more details, including that the immunity would date to Sept. 11, 2001. According to the Post, "The proposal states that 'no action shall lie … in any court, and no penalty … shall be imposed … against any person' for giving the government information, including customer records, in connection with alleged intelligence activity the attorney general certifies 'is, was, would be or would have been' intended to protect the United States from terrorist attack." The proposal is expected to be filed as an amendment to the fiscal 2008 intelligence authorization bill.

Catherine Rentz Pernot was an associate producer for Spying on the Home Front.