Congress enacted the Espionage Act of 1917 on June 15, two months after the United States entered World War I.
The Espionage Act of 1917 prohibited obtaining information, recording pictures, or copying descriptions of any information relating to the national defense with intent or reason to believe that the information may be used for the injury of the United States or to the advantage of any foreign nation.
The act also created criminal penalties for anyone obstructing enlistment in the armed forces or causing insubordination or disloyalty in military or naval forces.
In June 1918, Title 1 of the Espionage Act was expanded to limit speech critical of the war with the passage of the Sedition Act of 1918. Although Congress repealed the Sedition Act of 1918 in 1921, many portions of the Espionage Act of 1917 are still law.
Several cases involving the Espionage Act (and the 1918 Sedition Act) made it to the Supreme Court in the years following World War I, with the court upholding several convictions under the law. The rulings during this period established early concepts such as allowing the government more latitude during wartime to punish speech that creates a "clear and present danger."