Say you're a senior national security adviser on a campaign and part of your job is to speak to foreign ambassadors. You know the United States government often has such foreign officials under electronic surveillance, but you also know that, as an American citizen, you're still protected by the Fourth Amendment. Unfortunately for you, the FBI can collect your communications — emails, texts, chats, or calls — with those foreign officials and look at them without a warrant.

How is that possible? Nearly 10 years ago, Congress gave the NSA broad authority to intercept Internet communications, as long as it was for foreign intelligence purposes. That authority, known as Section 702, has played a valuable role in disrupting terrorist plots and gathering foreign intelligence, but it has always had two serious flaws.

First, its drafters did not carefully consider what protections should exist for U.S. persons whose communications would be reviewed by law enforcement. Second, the drafters did not foresee what having a statute that allowed for broad collection against foreigners would mean for U.S. companies operating overseas. But now, Congress has an opportunity to fix these two flaws before this statute expires at the end of the year.

According to government officials, Section 702 has played a crucial role in disrupting terrorist plots. A group commissioned by President Barack Obama to review the statute concluded that information obtained through it had "contributed in some degree" to the success of 53 terrorism investigations. In particular, intelligence agencies have highlighted that Section 702 helped disrupt a plot to bomb the New York subway system and a terrorism financing scheme operating out of Missouri. Successes like these have led intelligence officials to describe it as their "most significant tool" for the "detection, identification, and disruption of terrorist threats."

But while Section 702 is a powerful tool in the fight against terror, it raises serious concerns in the law enforcement context.

Section 702 allows the NSA to collect the communications of foreign persons from U.S. tech companies like Microsoft and Google and from U.S. telecom firms' networks. This collection, though targeted at potentially dangerous foreigners, inevitably sweeps up the communications of innocent Americans and non-Americans. These communications can be accessed by the FBI when investigating not only national security matters, but any crime. Because Section 702 information is not obtained pursuant to a warrant, this allows the FBI to evade the requirements of the Fourth Amendment and unconstitutionally invade the privacy of Americans.

American tech companies are also affected by Section 702. After particulars of 702 surveillance were leaked to the press, foreign governments, anxious about being surveilled by the NSA, denied contracts to U.S. tech firms like Microsoft and Verizon. More destructive was a 2015 ruling by the European Court of Justice which cited concerns about Section 702 when striking down a framework known as the Safe Harbor, which protected American tech companies from certain European data regulations.

Without Safe Harbor, U.S. companies could have been required to locate Europeans' data on servers in the European Union, with this seriously increasing companies' costs and proving especially prohibitive for start-ups. Although EU and U.S. authorities quickly implemented a replacement for Safe Harbor known as Privacy Shield, that agreement is already being challenged in EU courts. If it is struck down, the commerce-killing requirements that were predicted in the aftermath of Safe Harbor could become a reality, bringing transatlantic data flows and trade to a screeching halt.

Congress should reauthorize Section 702, but it should also amend it to protect Americans' rights and empower U.S. companies to push back against government surveillance that hurts their bottom lines. As lawmakers do this, they can ensure that Americans are safe, their rights are respected, and our companies continue to compete in the global marketplace.

Mieke Eoyang (@MiekeEoyang ) is the vice president for the National Security Program at Third Way and previously served as a subcommittee staff director on the House Permanent Select Committee on Intelligence. Gary Ashcroft (@ashcroftgm ) is a national security fellow at Third Way.

If you would like to write an op-ed for the Washington Examiner, please read our guidelines on submissions here.