The Senate on Wednesday approved a bill that will overhaul rules on terrorist surveillance while giving the Bush administration a win it had sought for months: legal immunity for telecommunications companies that helped in its secret eavesdropping program.
The Senate approved the changes to the Foreign Intelligence Surveillance Act on a 69-28 vote.
The action sends the bill the president's desk. The House approved the measure last month.
President Bush said he will sign the bill "soon," and praised lawmakers for their work in bringing the bill to his desk.
"This legislation is critical to America's safety. It is long overdue. ... I will soon sign this bill into law," Bush told reporters gathered at the White House Rose Garden. Officials indicated afterward that the president could sign it as soon as Thursday or Friday.
"This ill will help our intelligence professionals learn who the terrorists are talking to, what they are saying, and what they are planning," Bush said.
He also said the bill will protect the companies that assist the government in eavesdropping from past and future lawsuits, and it will "uphold our most solemn obligations as officials of the federal government to protect the American people."
Bush also pointed to the bipartisan nature of the bill.
"This legislation shows that even in an election year, we can come together and get important pieces of legislation passed," he added.
Earlier Wednesday, senators affirmed their intention to follow through on a promise to protect telecoms by turning back three amendments that would have altered the bill.
The long fight on Capitol Hill — lasting nearly a year — has centered on one question: whether to shield from civil lawsuits telecommunications companies that helped the government eavesdrop on American phone and computer lines after the 9/11 terrorist attacks, without the permission or knowledge of a secret court created by FISA.
The lawsuits allege that the White House and the companies violated U.S. law by going around the FISA court to start the wiretaps. The court was created 30 years ago to prevent the government from abusing its surveillance powers for political purposes, as was done in the Vietnam War and Watergate eras. The court is meant to approve all wiretaps placed inside the U.S. for intelligence-gathering purposes. The law has been interpreted to include international e-mail records stored on servers inside the U.S.
"This president broke the law," said Sen. Russell Feingold, D-Wis.
The Bush administration brought the wiretapping back under the FISA court's authority only after The New York Times revealed the existence of the program. A handful of members of Congress knew about the program from top secret briefings. Most members are still forbidden to know the details of the classified program, and some object that they are being asked to grant immunity to the telecoms without first knowing what they did.
The White House had threatened to veto the bill unless it immunized companies like AT&T Inc. and Verizon Communications Inc., from wiretapping lawsuits. About 40 such lawsuits have been filed. They are all pending before a single federal district court.
Sen. Arlen Specter, R-Pa., compared the senate vote on immunity to buying a "pig in a poke."
Opponents to immunity argue that only in court will the full extent of the program be understood, and only a judge should decide whether the program broke the law.
Just under a third of the Senate, including presumptive Democratic presidential nominee Barack Obama, supported an amendment proposed by Sen. Christopher Dodd, D-Conn., that would have stripped immunity from the bill. It was defeated on a 32-66 vote. Presumptive Republican nominee John McCain did not vote.
Specter proposed an amendment to require a district court judge to assess the legality of warrantless wiretapping before granting immunity. It failed on a 37-61 vote.
Sen. Jeff Bingaman, D-N.M., proposed that immunity be delayed until after a yearlong government investigation into warrantless wiretapping is completed. His amendment failed on a vote of 42-56.
The bill tries to address concerns about the warrantless wiretapping program by requiring inspectors general inside the government to conduct a yearlong investigation into the program.
The new surveillance bill also sets new rules for government eavesdropping. Some of them would tighten the reins on current government surveillance activities, and others loosen them compared with a law passed 30 years ago.
For example, it would require the government to get FISA court approval before it eavesdrops on an American overseas. Currently, the attorney general approves that category of electronic surveillance on his own.
But the bill also would allow the government to obtain broad, yearlong intercept orders from the FISA court that target foreign groups and people, raising the prospect that communications with innocent Americans would be swept up. The court would approve how the government chooses the targets, and how the intercepted American communications are to be protected.
The original FISA law required the government to get wiretapping warrants for each individual targeted from inside the United States, on the rationale that most communications inside the U.S. would involve Americans whose civil liberties must be protected. But technology has changed. Purely foreign communications increasingly pass through U.S. wires and sit on American computer servers, and the law required court orders be obtained to access those as well.
The bill would give the government a week to conduct a wiretap in an emergency before it must apply for a court order. The original law only allowed three days.
The bill restates that the FISA law is the only means by which wiretapping for intelligence purposes can be conducted inside the United States. This is meant to prevent a repeat of warrantless wiretapping by future administrations.
The bill is very much a political compromise reached against a deadline: Yearlong wiretapping orders authorized by Congress last year will begin to expire in August. Without a new bill, the government would go back to old FISA rules, requiring multiple new orders and potential delays to continue those intercepts, something most of Congress did not want to see happen, particularly in an election year.
The Associated Press contributed to this report