Washington (AFP) - The US Senate passed landmark legislation Tuesday that ends the government's bulk telephone data dragnet, significantly reversing American policy by reining in the most controversial surveillance program since 9/11.

The House of Representatives has already passed the measure, which also reauthorizes key national security programs that had lapsed early this week, and it now goes to President Barack Obama for his signature.

"Glad the Senate finally passed the USA Freedom Act. It protects civil liberties and our national security," Obama said on Twitter.

"I'll sign it as soon as I get it."

In a separate statement later Tuesday, Obama chided lawmakers for the "needless delay and inexcusable lapse in important national security authorities," in the days leading up to the bill's eventual passage.

"My administration will work expeditiously to ensure our national security professionals again have the full set of vital tools they need to continue protecting the country," the president said.

The bill halts the National Security Agency's ability to scoop up and store metadata -- telephone numbers, dates and times of calls -- from millions of Americans who have no connection to terrorism.

It shifts responsibility for storing the data to telephone companies, allowing authorities to access the information only with a warrant from a secret counterterror court that identifies a specific person or group of people suspected of terror ties.

"It's a historic moment," Senator Patrick Leahy, the senior Democratic sponsor of the bill, said after the 67-32 vote, describing the bill as "the first major overhaul of government surveillance laws in decades."

The vote follows days of sharp debate on the floor, with many Republicans split over their support for strong counterterror measures and the need for personal privacy protections in the wake of former NSA contractor Edward Snowden's bombshell revelations about the bulk data dragnet in 2013.

Story continues





- Important but 'not enough' -





The fugitive Snowden, alternatively seen as a villain by intelligence backers and a hero by supporters of stronger civil liberties, hailed the congressional action as "historic."

Speaking by live video link from Russia at an Amnesty International event in London shortly before the bill was passed, Snowden called efforts to end mass surveillance "not enough" but "an important step."

The Republican divisions, as well as delay tactics by Senator Rand Paul, a 2016 presidential candidate, forced an expiration of the bulk data collection program and two other sections of the USA Patriot Act, roving wiretap and lone-wolf tracking authorities, all of which expired at midnight Sunday.

The legislation that passed Tuesday would reauthorize the latter two provisions.

The strong vote marked a stunning rebuke to Senate Majority Leader Mitch McConnell, who sought in vain to amend the bill.

One of the changes would have extended the transition period from six months to a year from NSA storage to telecoms storage of the data.

Another would have stripped out a provision that declassifies rulings by the secret Foreign Intelligence Surveillance (FISA) Court, a move critics have argued would erode important transparency that was built into the Freedom Act.

The changes were rejected, with at least 11 Republicans opposing McConnell to vote against the amendments.

McConnell decried the reform bill as "a step backward."

"This is going to diminish our ability to respond to the myriad threats we have today," he said in a provocative floor speech in which he accused the Obama administration of withdrawing from leadership in the battle against extremism.

"It is also a resounding victory for those who continually plot against our homeland," McConnell said.

The vote occurred against a backdrop of Republican infighting and tension about the bill.

House leaders had warned that any change to the bill could delay its final passage or even kill it, which would have meant several national security authorizations expiring for good.

"If the Senate changes it, it would bring a real challenge inside the House," number two House Republican Kevin McCarthy said Tuesday.

McConnell insisted that Congress was "misreading" the public mood about surveillance, and he cited a CNN poll released Monday which shows 61 percent of Americans want the law renewed enabling the NSA to collect Americans' phone records.

Senator Mike Lee, a conservative Republican who teamed with Leahy on the legislation, hailed the passage as "a huge win for national security and the Fourth Amendment" of the US Constitution which protects against unreasonable searches and seizures.

Major Internet firms also declared victory with the congressional approval.

"The USA Freedom Act realizes hard-fought and much-needed wins for Internet users everywhere, including prohibiting the bulk collection of user data," Yahoo! said in a statement.