WASHINGTON (Reuters) - Members of the U.S. House of Representatives Intelligence Committee are close to an agreement on how to overhaul a controversial National Security Agency surveillance program and hope to complete legislation soon, the top Democrat on the panel said on Wednesday.

FILE PHOTO - An aerial view shows the National Security Agency (NSA) headquarters in Ft. Meade, Maryland, U.S. on January 29, 2010. REUTERS/Larry Downing/File Photo

Representative Adam Schiff said he had proposed a compromise that would let intelligence agencies query a database of information on Americans in national security cases without a warrant, but would require a warrant to use the information in other cases, such as those involving serious violent crime.

“This would prevent law enforcement from simply using the database as a vehicle to go fishing, but at the same time it would preserve the operational capabilities of the program,” Schiff told reporters.

At issue is Section 702 of the Foreign Intelligence Surveillance Act, which allows the NSA to collect vast amounts of digital communications from foreign suspects living outside the United States. U.S. intelligence officials consider Section 702 among the most vital of tools at their disposal to thwart national security threats.

But the program, classified details of which were exposed in 2013 by former NSA contractor Edward Snowden, incidentally gathers communications of Americans, such as when they compete with foreigners. Currently, those communications can then be subject to searches without a warrant.

Congress must renew Section 702 in some form by Dec. 31 or the program will expire.

Schiff said he believed the compromise would be acceptable to many lawmakers, as well as the intelligence community and the Federal Bureau of Investigation. It is similar to legislation backed by the House Judiciary Committee.

However, there are still deep divides in both the Senate and the House over what to do about Section 702, as lawmakers balance demands for more privacy protections with spy agencies’ desire to preserve what they see as a valuable tool.

There are different renewal proposals in the House and Senate. One Senate bill would not require any warrants, which Schiff said he did not think could pass the House.

It was not clear whether lawmakers will vote on a standalone 702 bill or whether it would be part of a broader must-pass bill, such as a spending measure Congress must pass next month to keep the government open.

Another possibility would be a short-term extension to keep the current surveillance system in place and give Congress more time to come up with a solution that could become law.