Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — Section 702, the subject of surprising criticism from President Donald Trump on Thursday that had the intelligence community in an uproar, is part of a federal law that gives the U.S. government legal authority to spy on suspected terrorists overseas, by monitoring phone calls and Internet communications such as e-mails.

It was enacted as Section 702 of a law passed by Congress in 2008 that clarified the rules for gathering foreign intelligence. After the 9/11 attacks by 19 terrorist hijackers who came from overseas, the George W. Bush administration quickly ramped up intelligence collection on foreign targets — doing so without explicit legal authority.

When that activity became public, igniting a storm of criticism, Congress responded by passing Section 702, requiring the intelligence community to seek approval for its collection methods from the Foreign Intelligence Surveillance Court and setting limits on how the information can be used and disseminated inside the government.

Congress also said the law must be periodically renewed, or the authority will expire. On Thursday, the House voted for reauthorization, and the bill now goes to the Senate.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

While the law authorizes spying on what it calls "non-U.S. persons," meaning people outside the United States who are not American citizens or green-card holders, the surveillance sometimes picks up the communications of Americans. That can happen because the foreign targets are communicating with someone in the U.S., or because the surveillance picks up discussions by Americans about the foreign target.

Section 702 says the resulting intelligence must "minimize" references to Americans, either by deleting information about them entirely or disseminating it only under narrowly defined conditions.

Civil liberties groups object to a provision allowing the government to search data acquired under the 702 program for information about specific Americans without requiring a court-approved search warrant, concerns that intensified after former National Security Agency contractor Edward Snowden leaked classified documents about the government's surveillance of e-mails.

Sen. Rand Paul, R-Ky., has said he will filibuster the renewal bill if it does not include the warrant requirement.

A second privacy concern involves what's called "about collection," in which the NSA searches Internet messages for any mention of a foreign surveillance target, such as a name or an e-mail address, even though the communications are not to or from that target. While the NSA says it no longer conducts that kind of searching, civil liberties groups want the reauthorization law to explicitly ban it.

The intelligence community is unanimous in describing 702 as essential for preventing terrorist attacks. In its most recent report analyzing the program, the Privacy and Civil Liberties Oversight Board said over one-quarter of the NSA's reports on international terrorism include information based in whole or in part on 702 surveillance.

"This percentage has increased every year since the statute was enacted," it said.

In a joint statement the nation's top intelligence officials, Attorney General Jeff Sessions and FBI Director Christopher Wray called renewal "vital to keeping the nation safe." If Congress fails to act, they said, "intelligence collection on international terrorists and other foreign adversaries will be lost."

"The country will be less secure."