A federal court will be scrutinizing one of the National Security Agency’s worst spying programs on Monday. The case has the potential to restore crucial privacy protections for the millions of Americans who use the internet to communicate with family, friends, and others overseas.

The unconstitutional surveillance program at issue is called PRISM, under which the NSA, FBI, and CIA gather and search through Americans’ international emails, internet calls, and chats without obtaining a warrant. When Edward Snowden blew the whistle on PRISM in 2013, the program included at least nine major internet companies, including Facebook, Google, Apple, and Skype. Today, it very likely includes an even broader set of companies.

The government insists that it uses this program to target foreigners, but that’s only half the picture: In reality, it uses PRISM as a backdoor into Americans’ private communications, violating the Fourth Amendment on a massive scale. We don’t know the total number of Americans affected, even today, because the government has refused to provide any estimate.

This type of unjustifiable secrecy has also helped the program evade public judicial review of its legality because the government almost never tells people that it spied on them without a warrant. Indeed, the government has a track record of failing to tell Americans about this spying even when the person is charged with a crime based on the surveillance. That’s one reason why this case is so important — this time, the government has admitted to the spying.

In this case, the government accused a Brooklyn man, Agron Hasbajrami, of attempting to provide material support to a designated terrorist organization in Pakistan. After he pleaded guilty to one of the charges, the government belatedly admitted that it had read through his emails without a warrant.

Now Mr. Hasbajrami has challenged the government’s warrantless surveillance and is asking the Second Circuit Court of Appeals to throw out the resulting evidence. The American Civil Liberties Union and the Electronic Frontier Foundation are supporting him as friends-of-the-court, arguing that the surveillance was unconstitutional (the brief we filed is here). At the hearing on Monday, we’ll explain to a three-judge panel why the Fourth Amendment requires the government to get a warrant when it wants to exploit the communications of Americans who are swept up in PRISM.

This large-scale internet surveillance grew out of the Bush administration’s post-9/11 warrantless wiretapping program. It is conducted under a controversial law known as Section 702 of the Foreign Intelligence Surveillance Act. Relying on Section 702, the government intercepts billions of international communications — including many sent or received by Americans — and it hunts through them in investigations that have nothing to do with national security.

The government attempts to defend this spying by pointing out that its “targets” are foreigners located abroad. But this is no defense at all. Americans regularly communicate with individuals overseas, and the government uses PRISM surveillance to collect and sift through many of these private communications. The government has even admitted that one of the purposes of Section 702 is to spy on Americans’ international communications without a warrant.

The government casts a wide net, making it easy for innocent Americans who communicate with family, friends, and others overseas to be swept up. Relying on a single court order, the NSA uses Section 702 to put more than 125,000 targets under surveillance each year. These individuals need not be spies, terrorists, or accused of any wrongdoing — they can be journalists, business people, university researchers, or anyone else who may have information bearing remotely on “foreign affairs.”

PRISM is a warrantless wiretapping program that operates around the clock, vacuuming up emails, Facebook messages, Google chats, Skype calls, and the like. Government agents do not review all of the information in real-time — there’s simply too much of it. Instead, the communications are pooled together and stored in massive NSA, FBI, and CIA databases that can be searched through for years to come, using querying tools that allow the government to extract and examine huge amounts of private information.

One of the most problematic elements of this surveillance is the government’s use of “backdoor searches” to investigate individual Americans. Although the government says PRISM is targeted at foreigners who lack Fourth Amendment privacy rights, it systematically combs through its PRISM databases for the emails and messages of Americans. Indeed, FBI agents around the country routinely search for the communications of specific Americans using their names or email addresses — including at the earliest stages of domestic criminal investigations.

The result is an end-run around the Fourth Amendment. Investigators have easy access to a trove of Americans’ private emails, calls, and messages, without ever seeking individualized approval from any judge, as the Constitution requires.

This surveillance leaves far too much unchecked power in the hands of executive branch officials. Today, that includes President Trump, who as a candidate called for expanded spying on Americans. The ACLU is taking on this threat to Americans’ privacy rights, just as we challenged the government’s warrantless wiretapping across both the Bush and Obama administrations. Now the courts must do their part to ensure that Americans’ online communications receive the full protection of the Fourth Amendment.