Secretary of State for Security (Spain)

The Secretary of State for Security (SES) of Spain is the second-highest-ranking official in the Ministry of the Interior.

The SES is appointed by the Monarch with the advice of the Minister of the Interior. The Secretariat of State for Security that the SES leads is responsible for ensuring the free exercise of the constitutional rights, to direct and supervise the police forces, to coordinate the international police cooperation and to execute the government's policy about organized crime, terrorism, human trafficking, money laundering and related crimes. It is also responsible for ensuring the safety of all government buildings, to oversees the prison system, to ensure the good development of all electoral processes and collaborate along with the Customs Surveillance Service (SVA) in the border control.

From the Secretary of State for Security depends on four main departments: the Directorate-General of the Police, the Directorate-General of the Civil Guard, the General Secretariat for Penitentiary Institutions and the Directorate-General for International Relations and Immigration. In addition, the Secretary of State for Security tops the Intelligence Center for Counter-Terrorism and Organized Crime (CITCO).

History
The origins of this body dated from the 18th century, when a Superintendent of Police was created to oversees the public order in the Kingdom. However, the truly precursor was the Directorate-General for Security and Public Order, which existed between March and October 1858. After this, the competences were directly assumed by the Ministry of the Interior but in 1912 was created the Directorate-General for Security that was in active service until 1986, when the current Secretariat of State for Security was born.

The Directorate-General for Security was the main body responsible for the repression after the civil war and with the need of renovate the police and improve the image of the police corps, all the security departments were renamed and reorganizated.

Structure
From the Secretary of State for Security depends:
 * Director-General of the Police.
 * It's the official which leads the civil department responsible for the direction and supervision of the National Police Corps actions, maintain international relationships with other police departments within the scope of its competences, issue of passports, IDs, immigration documents, private security licenses and other documents of its competence and provides the police with all the necessary materials (ammo, weapons, cars, helicopters...)
 * Director-General of the Civil Guard.
 * It's the official which leads the civil department responsible for the direction and supervision of the Civil Guard actions in coordination with the Ministry of Defence, establish the territorial organization of the Civil Guard, supervise the Civil Guard's competences over weapons and explosives, provide the police with all the necessary materials (ammo, weapons, cars, helicopters...) and to establish a fluent coordination between the Directorate-General and the Secretary of State for Migrations in the competences of the Civil Guard over foreigners.
 * Director-General for International Relations and Immigration.
 * The Director-General for International Relations and Immigration tops the Directorate-General for International Relations and Immigration which is responsible for the coordination of the international relations of the Ministry (highlighting mainly the European Union), the supervision of the police forces in embassies and other diplomatic missions abroad in coordination with the different directorates general of the police forces, the participation in the negotiations of international agreements over security and the supervision and improvement proposal over the migration issue.
 * Director-General for Coordination and Studies.
 * The Director-General for Coordination and Studies tops the Directorate-General for Coordination and Studies which is responsible for supporting and advising the Secretary of State in the coordination of the police forces. This body also designs the plans about citizen security and it does statistical studies about criminality, among others.
 * Deputy Director-General for Planning and Management of Infrastructures and Means for Security.
 * It's responsible for planning the investments in security infraestructures, for proposing and overseen the works in the scope of security, manage and execute the programs of its competence coming from European founds, manage the Ministry's goods and carry out all the competences that the Secretary of State delegates on it.
 * Deputy Director-General for Information and Communications Systems for Security.
 * It's responsible for planning the investments in information and communications systems, standardize and homogenize these systems, the proposal of acquisition of new systems and modernition of the existed, manage and execute the programs of its competence coming from European founds, coordinate and develop data bases, communication systems and information systems (highlighting that related with the Eu-Lisa, Schengen system and with the Digital Emergency Radio State System), coordinate the investments in security R&D and the direction of the Security Technological Center.

List of secretaries of state

 * Rafael Vera Fernández-Huidobro (1986–1994)
 * Margarita Robles (1994–1996)
 * Ricardo Martí Fluxá (1996–2000)
 * Pedro Morenés (2000–2002)
 * Ignacio Astarloa (2002–2004)
 * Antonio Camacho Vizcaíno (2004–2011)
 * Justo Tomás Zambrana Pineda (2011)
 * Ignacio Ulloa Rubio (2011–2013)
 * Francisco Martínez Vázquez (2013–2016)
 * José Antonio Nieto Ballesteros (2016–2018)
 * Ana Botella Gómez (2018–2020)
 * Rafael Pérez Ruiz (2020–present)