Federal Bureau of Investigation Director Christopher Wray urges renewal of Section 702 of the Foreign Intelligence Surveillance Act at the Heritage Foundation on Friday, saying that if Congress makes changes to the program it would be a return to pre-9/11 mistakes in intelligence-sharing. (Chip Somodevilla/Getty Images)

FBI Director Christopher A. Wray warned Friday that changing the rules of a soon-to-expire surveillance program could create new barriers to preventing terrorist attacks, similar to those that existed before 2001.

In defending his agency’s information-sharing program with the National Security Agency — which civil liberties groups have criticized as a threat to privacy — Wray said his agents get just a small piece of the NSA’s intelligence gathering.

“The FBI only receives collection for a very small percentage of what the NSA does. It’s about 4.3 percent of the targets under NSA collection. But that 4.3 percent is unbelievably valuable to our mission,’’ Wray said during an appearance at the Heritage Foundation, a conservative think tank in Washington. He did not say how large that database is.

Wray offered a forceful defense of the program, which is often referred to by the law that authorizes it, Section 702 of the Foreign Intelligence Surveillance Act. Section 702 is due to expire at the end of the year, setting up a battle in Congress over whether it should be modified to include additional privacy safeguards for Americans.

Section 702 authorizes the NSA to target the electronic communications of foreign citizens outside the United States for intelligence-gathering purposes. In collecting those calls and emails, some Americans’ communications also are intercepted, but officials have long resisted saying how many. The FBI is allowed to search the 702 database for national security purposes, by making a query for things like an email address or a name.

Lawmakers on the left and the right would like to see the law modified so that the FBI would need a warrant to review some query results.

Proposed legislation by the top Republican and Democrat on the House Judiciary Committee would not require a warrant to query the database, but it would require one for the FBI to review any communications returned in response to a query seeking evidence of a crime. Under the proposed law, the new restriction would not apply to queries for counterterrorism, counterproliferation or counterespionage purposes.

The American Civil Liberties Union and other groups argue that the proposed bill doesn’t go far enough — and that a warrant should be required for all searches of the database.

U.S. officials sometimes refer to Section 702 as the “crown jewel’’ of surveillance programs, saying it has been critical to detecting nascent terrorist plots, such as a plan to detonate homemade bombs on the New York City subways in 2009. It has also helped the government better understand Russian efforts to interfere with the 2016 election, officials have said.

In his remarks Friday, Wray insisted any new limits on Section 702 would be a major setback for national security.

“Any material change to the FBI’s use of 702 would severely inhibit our ability to keep the American people safe,’’ he said.

In 2008, Congress passed the law creating Section 702 in response to an outcry over the disclosure of a warrantless surveillance program begun by the George W. Bush administration after the 2001 terrorist attacks.

The law allows the NSA to target the communications of individuals overseas if they fall into a number of broad court-approved categories of foreign intelligence interest, including counterterrorism, counterproliferation, cybersecurity and foreign powers.

Last year, the NSA targeted 106,000 foreign citizens. Anyone those targets corresponded with also had their communications picked up. This is called “incidental” collection.

Senior government officials said that as a legal matter, no warrant is required to query data already collected lawfully. At least three federal district courts and the Foreign Intelligence Surveillance Court, which oversees and approves surveillance involving national security matters, have agreed with that position. One appeals court has sidestepped the issue, and a second has yet to rule.

Wray said many of the concerns about the program stem from misunderstandings of how it works.

As an example, he said that if the FBI received a tip that a person had been observed taking what appeared to be surveillance photos of a bridge in Washington, an agent would then check the 702 database. Such an inquiry might tell them if that person had been in contact with an Islamic State recruiter and was worthy of further investigation.

But if the FBI was forced to get a warrant to review that kind of information, he said, the agency might never be able to connect those dots, because simply photographing a bridge probably wouldn’t be suspicious enough to legally justify a warrant.

Except for about 10 terrorism cases, “Section 702 has not been used for any traditional criminal case as evidence in a trial,’’ Wray said. “So the notion that there are criminal agents using Section 702 to make garden variety criminal cases is just a myth — that’s not happening.’’

Wray compared proposed limitations on the 702 program to information-sharing barriers that existed inside the government before Sept. 11, 2001.

To put new limits on the 702 program would be “a self-inflicted wound,” Wray said, adding, “I beg the country not to go there again. . . . For God’s sake, people, let’s not take a step backwards.’’