Gabriella Demczuk, Getty Images

Should the government be allowed to look up Americans in spy databases without an individual warrant? The Senate heard arguments on both sides on Tuesday.

The hearing considered the reauthorization of two major NSA surveillance programs that collect online communications. They first burst into the public arena in 2013, when NSA documents leaked by Edward Snowden prompted news reports about the surveillance efforts. Critics said the programs amounted to mass surveillance of Americans by their own government, but intelligence officials called the programs vital to national security and said collection of American user information was incidental.

Despite reforms passed in 2015 that resulted in increased transparency, those are still the major arguments when it comes to the section of the law that allows the NSA to conduct these programs.

Section 702 of the Foreign Intelligence Surveillance Act Amendments Act is up for reauthorization in December 2017, and the Senate Judiciary Committee on Tuesday held the first public debate of its reauthorization since the Snowden leaks.

The government has to protect national security and defend the civil liberties of its citizens, said Iowa Sen. Chuck Grassley, who chairs the Senate Judiciary Committee. The Section 702 programs, he added, "sit at the intersection of these responsibilities."

One of those programs, called PRISM, pulls emails and other communications from special portals in the servers of participating companies. The "upstream" surveillance program sifts through Internet traffic flowing along the fiber-optic cables that serve as the backbone of the Internet.

On Tuesday, Senators heard testimony from a range of surveillance and civil liberties experts, all of whom split over one major issue: whether the government must get warrants for individual Americans when searching through the databases filled with information gathered by the Section 702 programs.

It's a question that weighs Fourth Amendment rights to privacy against the need for communication between government agencies when preventing terrorist attacks.

Under Section 702, the government currently does not need an individual warrant to collect information on Americans as long as the target of the collection is a foreigner who happens to be communicating with someone in the United States.

So what happens if, later, an investigator with the FBI wants to look through NSA databases to find information on an American suspect in a criminal case? That is legitimate, said California Sen. Dianne Feinstein, who attended the hearing and who is the vice chair of the Senate Intelligence Committee.

"The FBI is investigating open cases," Feinstein said. "We shouldn't let down our guard, because to do so is actually to invite disaster."

Elizabeth Goitein, co-director of the Liberty & National Security Program at the New York University School of Law, said she agreed that the FBI should have open lines of communication with other government agencies to prevent terrorism. But that's where she drew the line.

"What the Fourth Amendment cannot tolerate is the government collecting information, communications, with the intent of mining it for criminal cases against Americans," Goitein said

"That's where you and I differ," Feinstein replied.

The hearing closed with an admonition from Minnesota Sen. Al Franken, who called the Section 702 programs vital but said we have to consider the framers of the US Constitution and their fear of a government that acts in bad faith.

"This use of information that we get through 702 can be misused," he said.