After the revolution in Russia in 1917, the communist movement gradually gained footholds in many countries around the world.
In Europe and the US, communist parties were formed, generally allied with trade union and labor causes.
During the First Red Scare of 1919–1920, many Americans were fearful that Bolshevism and anarchism would lead to disruption within the US.
In the late 1930s, state and federal legislatures passed laws designed to expose communists, including laws requiring loyalty oaths, and laws requiring communists to register with the government.
Even the American Civil Liberties Union (ACLU), a free-speech advocacy organization, passed a resolution in 1939 expelling communists from its leadership ranks.

Following Congressional investigation of left-wing and right-wing extremist political groups in the mid-1930s, support grew for a statutory prohibition of their activities.
The alliance of Nazi Germany and the Soviet Union in the August 1939 Molotov–Ribbentrop Pact and their invasion of Poland in September gave the movement added impetus.
In 1940 the Congress passed the Alien Registration Act of 1940 (known as the Smith Act) which required all non-citizen adult residents to register with the government, and made it a crime "to knowingly or willfully advocate ... the duty, necessity, desirability, ... of overthrowing or destroying any government in the United States by force or violence ... with the intent to cause the overthrow or destruction of any government in the United States...." Five million non-citizens were fingerprinted and registered following passage of the Act.
The first persons convicted under the Smith Act were members of the Socialist Workers Party (SWP) in Minneapolis in 1941.
Leaders of the CPUSA, bitter rivals of the Trotskyist SWP, supported the Smith Act prosecution of the SWP – a decision they would later regret.
In 1943, the government used the Smith Act to prosecute American Nazis; that case ended in a mistrial when the judge died of a heart attack.
Anxious to avoid alienating the Soviet Union, then an ally, the government did not prosecute any communists under the law during World War II.

The CPUSA's membership peaked at around 80,000 members during World War II under the leadership of Earl Browder, who was not a strict Stalinist and cooperated with the US government during the war.
In late 1945, hardliner William Z. Foster took over leadership of the CPUSA, and steered it on a course adhering to Stalin's policies.
The CPUSA was not very influential in American politics, and by 1948 its membership had declined to 60,000 members.
Truman did not feel that the CPUSA was a threat (he dismissed it as a "non problem") yet he made the specter of communism a campaign issue during the 1948 election.

The perception of communism in the US was shaped by the Cold War, which began after World War II when the Soviet Union failed to uphold the commitments it made at the Yalta Conference.
Instead of holding elections for new governments, as agreed at Yalta, the Soviet Union occupied several Eastern European countries, leading to a strained relationship with the US.
Subsequent international events served to increase the apparent danger that communism posed to Americans: the Stalinist threats in the Greek Civil War (1946–1949); the Czechoslovak coup d'état of 1948; and the 1948 blockade of Berlin.

The view of communism was also affected by evidence of espionage in the US conducted by agents of the USSR.
In 1945, a Soviet spy, Elizabeth Bentley, repudiated the USSR and provided a list of Soviet spies in the US to the Federal Bureau of Investigation (FBI).
The FBI also had access to secret Soviet communications, available from the Venona decryption effort, which revealed significant efforts by Soviet agents to conduct espionage within the US.
The growing influence of communism around the world and the evidence of Soviet spies within the US motivated the Department of Justice – spearheaded by the FBI – to initiate an investigation of communists within the US.
After the revolution in Russia in 1917, the communist movement gradually gained footholds in many countries around the world. In Europe and the US, communist parties were formed, generally allied with trade union and labor causes. During the First Red Scare of 1919–1920, many Americans were fearful that Bolshevism and anarchism would lead to disruption within the US. In the late 1930s, state and federal legislatures passed laws designed to expose communists, including laws requiring loyalty oaths, and laws requiring communists to register with the government. Even the American Civil Liberties Union (ACLU), a free-speech advocacy organization, passed a resolution in 1939 expelling communists from its leadership ranks.
Following Congressional investigation of left-wing and right-wing extremist political groups in the mid-1930s, support grew for a statutory prohibition of their activities. The alliance of Nazi Germany and the Soviet Union in the August 1939 Molotov–Ribbentrop Pact and their invasion of Poland in September gave the movement added impetus. In 1940 the Congress passed the Alien Registration Act of 1940 (known as the Smith Act) which required all non-citizen adult residents to register with the government, and made it a crime "to knowingly or willfully advocate ... the duty, necessity, desirability, ... of overthrowing or destroying any government in the United States by force or violence ... with the intent to cause the overthrow or destruction of any government in the United States...." Five million non-citizens were fingerprinted and registered following passage of the Act. The first persons convicted under the Smith Act were members of the Socialist Workers Party (SWP) in Minneapolis in 1941. Leaders of the CPUSA, bitter rivals of the Trotskyist SWP, supported the Smith Act prosecution of the SWP – a decision they would later regret. In 1943, the government used the Smith Act to prosecute American Nazis; that case ended in a mistrial when the judge died of a heart attack. Anxious to avoid alienating the Soviet Union, then an ally, the government did not prosecute any communists under the law during World War II.
The CPUSA's membership peaked at around 80,000 members during World War II under the leadership of Earl Browder, who was not a strict Stalinist and cooperated with the US government during the war. In late 1945, hardliner William Z. Foster took over leadership of the CPUSA, and steered it on a course adhering to Stalin's policies. The CPUSA was not very influential in American politics, and by 1948 its membership had declined to 60,000 members. Truman did not feel that the CPUSA was a threat (he dismissed it as a "non problem") yet he made the specter of communism a campaign issue during the 1948 election.
The perception of communism in the US was shaped by the Cold War, which began after World War II when the Soviet Union failed to uphold the commitments it made at the Yalta Conference. Instead of holding elections for new governments, as agreed at Yalta, the Soviet Union occupied several Eastern European countries, leading to a strained relationship with the US. Subsequent international events served to increase the apparent danger that communism posed to Americans: the Stalinist threats in the Greek Civil War (1946–1949); the Czechoslovak coup d'état of 1948; and the 1948 blockade of Berlin.
The view of communism was also affected by evidence of espionage in the US conducted by agents of the USSR. In 1945, a Soviet spy, Elizabeth Bentley, repudiated the USSR and provided a list of Soviet spies in the US to the Federal Bureau of Investigation (FBI). The FBI also had access to secret Soviet communications, available from the Venona decryption effort, which revealed significant efforts by Soviet agents to conduct espionage within the US. The growing influence of communism around the world and the evidence of Soviet spies within the US motivated the Department of Justice – spearheaded by the FBI – to initiate an investigation of communists within the US.
Smith Act trials of Communist Party leaders