Civil liberties groups charged the measure would create a broad net that would sweep up law-abiding U.S. citizens. But the House of Representatives gave its concurrence to the bill, 227-183, a day after it won Senate approval, 60-28.
"After months of prodding by House Republicans, Congress has finally closed the terrorist loophole in our surveillance law--and America will be the safer for it," declared House Minority Leader John Boehner, an Ohio Republican.
"We think it is not the bill that ought to pass," said House Majority Leader Steny Hoyer. But Hoyer conceded he and fellow Democrats were unable to stop the measure after a showdown with the White House amid warnings of possible attacks on the United States.
With lawmakers set to begin a month-long recess this weekend, Bush had called on them to stay until they passed the legislation.
"Protecting America is our most solemn obligation," Bush said earlier in the day in urging Congress to send him the bill so he could sign it into law.
The measure would authorize the National Security Agency to intercept without a court order communications between people in the United States and foreign targets overseas.
The administration would have to submit to a secret court a description of the procedures they used to determine that warrantless surveillance only targeted people outside the United States.
The court, created by the 1978 Foreign Intelligence Surveillance Act (FISA), would review the procedures and order changes, if needed. The administration could appeal.
FISA now requires the government to obtain orders from its court to conduct surveillance of suspected terrorists in the United States.
But after the September 11 attacks, Bush authorized warrantless interception of communications between people in the United States and others overseas if one had suspected terrorist ties. Critics charged that program violated the law, but Bush argued he had wartime powers to do so.
In January, Bush put the program under the supervision of the FISA court, but the terms have not been made public. Congress has subpoenaed documents in an effort to determine Bush's legal justification for the warrantless surveillance.
The new bill was needed in part, aides said, because of restrictions recently imposed by the secret court on the ability of spy agencies to intercept communications.
Final passage of the bill came a day after Republicans rejected Democratic alternatives that would have provided greater court supervision.
The measure is to expire in six months. Lawmakers are to come up with permanent legislation in the meantime.
Director of National Intelligence Mike McConnell said he needed the measure "in order to protect the nation from attacks that are being planned today to inflict mass casualties on the United States."
Rep. Jerrold Nadler, a New York Democrat, opposed the bill, saying, "Sadly, Congress has been stampeded by fear-mongering and deception into signing away our rights."
"With the President set to sign this bill into law, I do not believe we will soon be able to undo this damage," Nadler said. "Rights given away are not easily regained."
Sen. Dianne Feinstein of California, who broke ranks with many fellow Democrats to vote for the measure, said: "We are living in a period of heightened vulnerability and must give the intelligence community the tools they need."