The first Spanish intelligence service was created in 1935, in a short-lived experience with an almost null activity, due to the
Spanish Civil War paralysing its development. During the civil war, the
Servicio de Información Militar (SIM) provided intelligence service to the Republicans while the Servicio de Información y Policía Militar (SIPM) provided intelligence service to the Nationalists. Both organizations were dissolved at the end of the civil war. Student revolts by the end of the 1960s motivated the creation of a National Countersubversive Organization, which was the seed for the
Servicio Central de Documentación (SECED), founded in 1972. The
Centro Superior de Información de la Defensa (CESID) was formed between 1976 and 1977, from the fusion of the SECED and the High Staff of the Army Information Service (Spanish:
Servicio de Información del Alto Estado Mayor (SIAEM)). In 2001, the Government of the
People's Party reached consensus with other political groups represented in the Congress of Deputies, in particular with the
Spanish Socialist Workers' Party, to draft the laws that were to regulate the Spanish intelligence services. This was intended to reach the greatest possible consensus in the creation of such State Agencies in order to safeguard the democratic State, removing them, as much as possible, from party politics. In 2002, the current legal regulation of the National Intelligence Center (CNI) was reached, which was assigned a new name that simplifies and accurately determines its true function. The result of the aforementioned parliamentary agreements was the enactment of two complementary laws, one of which, Law 11/2002 of May 6, regulates the National Intelligence Center, while the other, of an organic nature (Organic Law 2/2002, of May 6), establishes judicial control prior to that certain actions must be submitted to the CNI. Later, in March 2004, the
Royal Decree that regulates the
National Cryptologic Center (CCN), a body attached to the CNI for the security of information technologies. The legal framework of the CNI is completed by the provision relating to the statutory regime of its personnel. The personnel regulations of the previous organization date back to 1995. The Law 11/2002 provides for the development of a new statute for the Center's staff. The 1995 regulations were modified in 2004. In 2013, a new regulation for personnel was approved. In 2011, after a ministerial reform undertaken by PM
Mariano Rajoy, the CNI became attached to the
Ministry of the Presidency but, after the change in government in 2018, PM
Pedro Sánchez has once again assigned the CNI to the
Ministry of Defence. In 2013, thanks to the
Global Surveillance Leaks by
Edward Snowden, it was learned that the CNI has been collaborating with the
NSA in the massive espionage of millions of Spaniards, directly intercepting or helping to intercept millions of
metadata of call logs, text messages and emails. In 2022 it was revealed that the CNI had spied on at least 18 phones of Catalan separatist politicians. In May 2022, the head of the CNI,
Paz Esteban López, was then fired. Esteban later admitted in a committee of the Spanish parliament that her agency, after obtaining court approval, had the devices of Catalan separatists infected with the help of the Israeli spy software
Pegasus. In 2023, two
United States consular officials were expelled from Spain after it was revealed that they had successfully bribed CNI intelligence agents for state secrets. In 2024 the CNI was revealed to be responsible for carrying out a major illegal espionage operation against the Catalan movement through the use of Pegasus spyware. == Directors of the CESID / CNI ==