An amendment from Sen. John McCain to expand the FBI's surveillance powers was narrowly defeated in the Senate on Wednesday morning.

The Arizona Republican's proposal failed in a 58-38 procedural vote that took nearly an hour to complete. That's a majority, but 60 votes were needed to end debate on the amendment, which McCain offered to a Justice Department spending bill.

McCain's language would have given the FBI the ability to issue national security letters to demand customer data, but not content, from telecommunications companies without a warrant. That could include browsing history and metadata, which can contain people's real-time location.

The agency already has the ability to use the mechanism by obtaining a court order, which critics said is more than enough.

Related Story: http://www.washingtonexaminer.com/article/2577390

It would also make permanent authorities under current law that allow for monitoring of "lone wolf" attackers who don't have direct connections to terrorist groups.

McCain has said his language represented a "serious solution" to fighting terrorism within the U.S.

"To be clear, this amendment would not allow the FBI access to the content of private messages, but will only allow law enforcement to look at non-content electronic communication transactional records in the course of a national security investigation, such as how much time a suspicious individual spends on a website," McCain said Monday.

"There are young people in this country that are self-radicalizing," McCain said on the Senate floor, referencing Sunday's terrorist attack in Orlando and others. "What vehicle is doing the self-radicalizing? The Internet."

Related Story: http://www.washingtonexaminer.com/article/2590118

Most Democrats indicated they opposed McCain's language.

"Supporters of this amendment … have suggested Americans need to choose between protecting security and protecting their constitutional right to privacy," Sen. Ron Wyden, D-Ore., said on the Senate floor. "The fact is, this amendment doesn't really do either."

"There is a specific section in the [USA] Freedom Act … that allows the FBI to demand all of these records in an emergency, and then go get court approval after the fact," Wyden added. "Unless you're opposed to court oversight even after the fact, there is no reason to support this amendment."

Sen. Patrick Leahy, D-Vt., noted the amendment had opposition from "major technology companies and privacy groups that go across the political spectrum, from FreedomWorks to Google to the ACLU."

Don’t be fooled by GOP surveillance amendment. It would not have prevented #Orlando but it unnecessarily expands FBI surveillance authority — Sen. Patrick Leahy (@SenatorLeahy) June 22, 2016



"The FBI already has authority to obtain this information if it obtains a court order," Leahy said. "None of us feel the FBI could come in our home, rifle through our notes … but they're saying because we do it electronically, through the Internet, they should be able to just ignore any right of privacy."