Spying laws in the United States are a patchwork of federal statutes that criminalize unauthorized collection or disclosure of information someone else has a legal right to keep secret. They cover everything from handing defense secrets to a foreign government, which can be punished by death, to installing spyware on a spouse’s phone, which is a felony carrying up to five years. Which statute applies depends on what was taken, who benefited, and how the information was obtained.
Espionage Against the United States
The Espionage Act of 1917, now spread across several sections of Title 18, is the backbone of federal espionage prosecution. The critical ingredient in these cases is intent. Prosecutors have to show the accused acted with the purpose of harming the United States or benefiting a foreign nation. That requirement separates espionage from an accidental leak or a careless security lapse. Someone who unknowingly leaves a classified folder on a train has a problem, but it is a different legal problem than someone who photographs that folder and hands it to a foreign intelligence officer.
Three statutes do most of the work.
Gathering or Losing Defense Information
Under 18 U.S.C. § 793, it is a federal crime to collect, transmit, or even negligently lose information related to the national defense when the person has reason to believe the information could harm the country or help a foreign nation. The statute reaches broadly, covering anyone who obtains defense-related documents, photographs, plans, or other materials without authorization and fails to return them on demand. Even gross negligence in handling classified materials can trigger prosecution, with a maximum sentence of ten years.1Office of the Law Revision Counsel. 18 USC 793 – Gathering, Transmitting or Losing Defense Information
Delivering Secrets to a Foreign Government
Penalties escalate sharply under 18 U.S.C. § 794 when someone actually delivers defense information to a foreign government, its agents, or a foreign military force. A conviction carries any term of years up to life. The death penalty is available in narrow circumstances: when the disclosure led to the identification and death of a U.S. intelligence agent, or when the information directly involved nuclear weapons, military satellites, early-warning systems, or war plans.2Office of the Law Revision Counsel. 18 USC 794 – Gathering or Delivering Defense Information to Aid Foreign Government
Classified Communications Intelligence
A separate statute, 18 U.S.C. § 798, targets the disclosure of classified cryptographic and communications intelligence. It covers the design of code-breaking systems, the intelligence activities of the United States or foreign governments, and information obtained through intercepting foreign communications. The maximum penalty is ten years.3Office of the Law Revision Counsel. 18 USC 798 – Disclosure of Classified Information
Economic and Trade Secret Spying
Not all spying involves national defense. The Economic Espionage Act of 1996 criminalizes trade secret theft and splits it into two offenses depending on who benefits.
When the theft is intended to benefit a foreign government or foreign agent, it falls under 18 U.S.C. § 1831. Individuals face up to 15 years in prison and fines up to $5,000,000. Organizations face fines of $10,000,000 or three times the value of the stolen trade secret, whichever is greater.4Office of the Law Revision Counsel. 18 USC 1831 – Economic Espionage
When the theft benefits a private competitor rather than a foreign power, 18 U.S.C. § 1832 applies instead. The intent element shifts: the person must have intended to convert the trade secret for someone else’s economic benefit while knowing the theft would injure the owner. Penalties are lower but still serious.5Office of the Law Revision Counsel. 18 USC 1832 – Theft of Trade Secrets
Either charge requires that the stolen information actually qualify as a trade secret under 18 U.S.C. § 1839. That means the owner took reasonable steps to keep it secret, and the information has independent economic value precisely because it is not publicly known. A company that leaves proprietary formulas on an open shared drive with no access controls will struggle to meet the first requirement. Prosecutors look for restricted access, encryption, and confidentiality agreements. Calling something a trade secret is not enough if the company did not actually treat it like one.6Office of the Law Revision Counsel. 18 USC 1839 – Definitions
Spying on Private Individuals
Federal law also reaches surveillance between private people, which is where most readers run into these issues: a suspicious spouse, a controlling employer, a stalker with technical skills, a former business partner.
The Federal Wiretap Act
The Wiretap Act, 18 U.S.C. § 2511, makes it a crime to intentionally intercept wire, oral, or electronic communications. “Intercept” means capturing the content of a communication in real time, whether by tapping a phone line, placing a recording device in a room, or using spyware to monitor calls and messages as they happen. A first offense carries up to five years.7Office of the Law Revision Counsel. 18 USC 2511 – Interception and Disclosure of Wire, Oral, or Electronic Communications Prohibited
Victims can also sue for civil damages under 18 U.S.C. § 2520. In most cases the court awards the greater of actual damages plus the violator’s profits, or statutory damages of $100 per day of violation or $10,000, whichever produces the larger number.8Office of the Law Revision Counsel. 18 USC 2520 – Recovery of Civil Damages Authorized
One-Party Versus All-Party Consent
Federal law permits recording a conversation when at least one party consents, which means you can legally record your own phone calls under federal law. The exception disappears if the recording is made for a criminal or otherwise illegal purpose.7Office of the Law Revision Counsel. 18 USC 2511 – Interception and Disclosure of Wire, Oral, or Electronic Communications Prohibited
State laws are more restrictive. Roughly a dozen states require all parties to consent before a conversation can be recorded. When a call crosses state lines and the two states have different rules, courts have not settled on a single approach. Some apply the law of the state where the recording happened, while others weigh the privacy interests of the person in the stricter state. The safest practice for interstate calls is to get everyone’s consent.
Stored Communications
The Stored Communications Act, 18 U.S.C. § 2701, covers a different scenario: accessing electronic communications already sitting on a server rather than intercepting them in transit. Breaking into someone’s email account, accessing their cloud storage, or reading their text messages through a service provider’s system all fall under this statute. Penalties depend on motive. If the unauthorized access was for commercial advantage, to cause damage, or in furtherance of another crime, the maximum is five years for a first offense and ten years for a repeat offense. Otherwise, a first violation carries up to one year.9Office of the Law Revision Counsel. 18 USC 2701 – Unlawful Access to Stored Communications
Hidden Cameras and Video Voyeurism
Federal law treats video differently from audio. The Video Voyeurism Prevention Act, 18 U.S.C. § 1801, makes it a crime to capture images of a person’s private areas without consent in any place where the person has a reasonable expectation of privacy. That includes anywhere a person would reasonably expect to undress without being watched. The federal statute applies in areas of special federal jurisdiction (military bases, federal buildings, national parks), while state laws cover the rest. Conviction carries up to one year.10Office of the Law Revision Counsel. 18 USC 1801 – Video Voyeurism
Computer-Based Spying
The Computer Fraud and Abuse Act, 18 U.S.C. § 1030, is the primary federal statute targeting unauthorized access to computer systems. It covers a wide spectrum of conduct, from hacking into a government network to obtain classified data down to exceeding authorized access on a work computer. Digital intrusion is now the most common method for stealing both government secrets and trade secrets, which puts the CFAA at the center of modern spying prosecutions.
The penalties scale with the seriousness of the offense:
- Accessing a computer without authorization and obtaining information that requires protection for national defense or foreign relations reasons carries up to ten years for a first offense and twenty years for a subsequent conviction.
- Unauthorized access to obtain information from a federal agency, financial institution, or any protected computer carries penalties that vary by the type of information and whether the access was for commercial gain.
- Using unauthorized computer access to further a fraud and obtain something of value carries up to five years for a first offense when the value exceeds $5,000 in a year.
The reach is broad enough that installing spyware on someone’s personal computer, accessing a co-worker’s account using stolen credentials, or deploying keylogging software on a company network can all trigger federal prosecution.11Office of the Law Revision Counsel. 18 USC 1030 – Fraud and Related Activity in Connection With Computers
Penalties at a Glance
The range of consequences across spying-related offenses is enormous:
- Delivering defense secrets to a foreign power under § 794: any term of years, life imprisonment, or death in cases involving the death of a U.S. agent or major weapons systems.2Office of the Law Revision Counsel. 18 USC 794 – Gathering or Delivering Defense Information to Aid Foreign Government
- Gathering or losing defense information under § 793: up to ten years.1Office of the Law Revision Counsel. 18 USC 793 – Gathering, Transmitting or Losing Defense Information
- Disclosing classified communications intelligence under § 798: up to ten years.3Office of the Law Revision Counsel. 18 USC 798 – Disclosure of Classified Information
- Economic espionage for a foreign power under § 1831: up to 15 years, fines up to $5,000,000 for individuals or $10,000,000-plus for organizations.4Office of the Law Revision Counsel. 18 USC 1831 – Economic Espionage
- Wiretapping under § 2511: up to five years, plus civil liability of at least $10,000.7Office of the Law Revision Counsel. 18 USC 2511 – Interception and Disclosure of Wire, Oral, or Electronic Communications Prohibited
- Unauthorized access to stored communications under § 2701: up to five years when committed for commercial advantage or malicious purposes; up to one year otherwise.9Office of the Law Revision Counsel. 18 USC 2701 – Unlawful Access to Stored Communications
Beyond imprisonment and fines, courts routinely order forfeiture of any profits earned through the illegal activity. The Foreign and Economic Espionage Penalty Enhancement Act of 2012 directed the U.S. Sentencing Commission to ensure sentences reflect the seriousness of the offense and the actual harm caused.12U.S. Government Publishing Office. Public Law 112-269 – Foreign and Economic Espionage Penalty Enhancement Act of 2012
Clearance Loss and Career Consequences
A conviction triggers collateral consequences that outlast any prison sentence. Security clearances are revoked permanently under the adjudicative guidelines at 32 C.F.R. Part 147, which list allegiance to the United States, criminal conduct, and security violations as disqualifying factors. For anyone whose career depends on a clearance, that revocation effectively ends their professional life in government, defense contracting, and intelligence work.
Cleared personnel also carry lifetime secrecy obligations. Anyone who receives a security clearance signs Standard Form 312, a nondisclosure agreement whose obligations do not expire when the job ends and apply for life unless the government issues a written release. The agreement assigns any profits from unauthorized disclosures to the government, so a former intelligence officer who publishes classified material without pre-approval forfeits the book royalties.13GSA.gov. Classified Information Nondisclosure Agreement SF 312
Reporting Suspected Spying
People who hold security clearances have a legal obligation to report suspicious foreign contacts. Security Executive Agent Directive 3 requires anyone with access to classified information to report continuing associations with foreign nationals, elicitation attempts, and other activity that could indicate foreign intelligence targeting. Failing to report can cost someone their clearance, bring disciplinary action, or lead to termination, even if the individual was not personally involved in espionage.14U.S. Department of State. Foreign Affairs Manual – Security Reporting Requirements
Private citizens and businesses who suspect foreign intelligence activity or cyber-enabled espionage can report it to the FBI, which maintains specialized cyber squads in each of its 56 field offices. SF-312 explicitly preserves whistleblower protections, so individuals who report suspected wrongdoing through proper channels (Congress, an Inspector General, or the Office of Special Counsel) are legally protected from retaliation even when the information they report would otherwise be classified.13GSA.gov. Classified Information Nondisclosure Agreement SF 312