The Central Intelligence Agency (CIA) and the National Security Council were created by the National Security Act of 1947. As the Soviet Union loomed as a new threat, the CIA was given the task of coordinating intelligence activities aimed at foreign powers and evaluating and disseminating national security intelligence gathered overseas. The CIA was endowed with a secret budget and was explicitly barred by Congress from engaging in domestic law enforcement and performing any “internal security function.”
But that ban on domestic spying did not last for long. As the Red Scare deepened in the 1950s, the CIA intercepted and photographed the outside envelopes of millions of pieces of mail sent from or to the United States, and opened hundreds of thousands of letters. It also collaborated with the FBI to draw up a watch list of domestic suspects.
In the mid 60s, the CIA created a covert Domestic Operations Division and began to carry out domestic spying operations that became Operation CHAOS in 1967. The program was supposed to search for the foreign funding and foreign ties of American dissidents, but soon evolved into the surveillance and infiltration of left wing groups, anti war activity, radical youth organizations, underground publications, Black militants and draft resisters. By the early 70s, Operation CHAOS received a thousand reports from the FBI each month, shared information with the FBI and law enforcement on 300,000 Americans and spied on a thousand domestic groups. In the late '60s, another CIA program called Project RESISTANCE spied on dissident activity on university campuses, while Project MERRIMAC focused specifically on anti-war protesters, with CIA infiltrating many of the groups.
The programs were shut down in the aftermath of Watergate. The CIA got involved again in the domestic spying business when the USA PATRIOT Act mandated the sharing of information among the various intelligence agencies, including the CIA.
According to the June 16, 2011 The New York Times, a former senior-level CIA official alleged "that officials in the Bush White House sought damaging personal information on a prominent American critic of the Iraq war in order to discredit him." Juan Cole, a University of Michigan professor and Middle East expert, was the alleged target.