Opinion editor's note: Star Tribune Opinion publishes a mix of national and local commentaries online and in print each day. To contribute, click here.

•••

This is an extraordinarily dangerous time for the U.S. and its allies. Israel's unpreparedness on Oct. 7 shows that even powerful nations can be surprised in catastrophic ways. Fortunately, Congress, in a rare bipartisan act, voted early Saturday to reauthorize a key intelligence power that provides critical information on hostile states and threats ranging from terrorism to fentanyl trafficking.

Civil libertarians argued that the surveillance bill erodes Americans' privacy rights and pointed to examples when American citizens got entangled in investigations. Importantly, the latest version of the bill adds dozens of legal safeguards around the surveillance in question — the most expansive privacy reform to the legislation in its history. The result preserves critical intelligence powers while protecting Americans' privacy rights in our complex digital age.

At the center of the debate is the Foreign Intelligence Surveillance Act. Originally passed in 1978, it demanded that investigators gain an order from a special court to surveil foreign agents inside the United States. Collecting the communications of foreigners abroad did not require court approval.

That line blurred in the digital age. Many foreign nationals rely on American providers such as Google and Meta, which route or store data in the U.S., raising questions as to whether the rules apply to where the targets are or where their data is collected. In 2008, Congress addressed that conundrum with Section 702. Instead of requiring the government to seek court orders for each foreign target, that provision requires yearly judicial approval of the rules that govern the program as a whole. That way, the government can efficiently obtain from communication providers the calls and messages of large numbers of foreign targets — 246,073 in 2022 alone.

Since then, Section 702 has supplied extraordinary insight into foreign dangers, including military threats, theft of American trade secrets, terrorism, hacking and fentanyl trafficking. In 2022, intelligence from 702 helped the government find and kill the Qaeda leader Ayman al-Zawahri, one of the terrorists responsible for Sept. 11. Almost 60% of the articles in the president's daily intelligence briefing include information from Section 702.

Although Section 702 can be used only to target foreigners abroad, it does include Americans when they interact with foreign targets. Not only is such incidental collection inevitable in today's globalized world; it can be vital to U.S. security. If a terrorist or spy abroad is communicating with someone here, our government must find out why.

Some of what is found via Section 702 is therefore sent from the National Security Agency to the FBI. The FBI, which investigates threats to national security in the U.S., can then check that database for Americans under investigation for national security reasons.

We agree that those queries raise legitimate privacy concerns. And those concerns are especially acute for public officials and journalists whose communications with foreign officials and other potential intelligence targets may be sensitive for political or professional reasons.

It is also true that the FBI has broken the rules around these 702 database checks repeatedly in recent years. Agents ran improper queries related to elected officials and political protests. The wiretaps of Carter Page, a former Trump campaign adviser, also involved numerous violations of FISA rules. The Page wiretaps involved traditional FISA orders, not Section 702, but the bureau's many errors there raised understandable doubts about whether it can be trusted to comply with other FISA rules.

Fortunately, there are ways to prevent abuses of Section 702 without compromising its critical national security value. The bill passed by Congress contains numerous reforms that will dramatically improve compliance. It sharply limits the number and ranks of FBI agents who can run 702 queries, imposes strict penalties for misconduct and expands oversight by Congress and the courts.

Some of the bill's critics argued that the FBI should be required to obtain a warrant from a special FISA court before using the information collected under 702 when investigating Americans who may be involved in terrorism, espionage or other national security threats. But requiring such a warrant would have been unnecessary and unwise.

Getting a FISA court order is bureaucratically cumbersome and would slow down investigations — especially fast-moving cybercases, in which queries have proved especially useful. It would cause agents to miss important connections to national security threats. And because this information has already been lawfully collected and stored, its use in investigation doesn't require a warrant under the Constitution.

Another problem is that the probable cause needed for a warrant is rarely available early in an investigation. But that's precisely when these queries are most useful. Database checks allow an agent to quickly see whether there is a previously unnoticed connection to a foreign terrorist, spy or other adversary.

Balances struck between security and privacy need continual refinement. Recent years have shown Section 702′s great value for national security. But they have also revealed lax compliance at the FBI. The latest reauthorization boosts privacy without blinding our country to threats in today's dangerous world.

Matthew Waxman is a Columbia University law professor who served in senior national security roles in the George W. Bush administration. Adam Klein is the director of the Strauss Center for International Security and Law at the University of Texas, Austin, and served as the chairman of the Privacy and Civil Liberties Oversight Board from 2018 to 2021. This article originally appeared in the New York Times.