The Service de Documentation Extérieure et de Contre-Espionnage (English: External Documentation and Counter-Espionage Service, SDECE) was France's external intelligence agency from 6 November 1944 to 2 April 1982 when it was replaced by the Direction Générale de la Sécurité Extérieure (DGSE). It should not be confused with the Deuxième Bureau which was intended to pursue purely military intelligence.
Under the Fourth Republic the SDECE was subordinated to the Council President. From the onset of the Fifth Republic and until 1962, it was subordinate to Prime Minister Michel Debré and its resources largely dedicated to the Algerian War. Following the Mehdi Ben Barka affair, General Charles de Gaulle subordinated the service to the Ministry of Defence, and the service was gradually militarized.
Its next to last director was Alexandre de Marenches.
The SDECE was founded in 1946 as a successor to the wartime BCRA which was seen as too closely associated with the Gaullists to properly serve the republic. SDECE was known in France as la piscine (the swimming pool) because its HQ in Paris was located next to a public swimming pool. The SDECE was officially responsible to the Minister of Defense, but in fact reported to the president acting through a special adviser on intelligence matters. The SDECE was frequently involved in bureaucratic disputes with the Deuxième Bureau in Vietnam and Algeria, and within France with the Sûreté Générale, which led successive directors of the SDECE to see their real enemies as the other branches of the republic concerned with intelligence. As was usually the case with French intelligence, the division of responsibilities between rival agencies led to different arms of the French state to spend more time locked in bureaucratic disputes with one another than anything else. In September 1949, SDECE played a prominent role in the "scandal of the generals", when the Sûreté Générale revealed that the Army chief of staff had trusted confidential documents relating to the war in Vietnam to another general, who had given them to an SDECE agent who in turn had given them to the Vietminh. The French state tried to bury the story by ordering the newspapers not to print it, but the Paris correspondent of Time had reported to the New York office of Time. Unknown to him, the French state was illegally listening in to dispatches filed by foreign correspondents from Paris. The French embassy in Washington tried to suppress the story as embarrassing to France, but the U.S. government refused, citing the First Amendment, leading to the scandal of the Generals' affair as once the news broke in the United States, it was picked up by the French media.