In Spain, the legislative definition of agency is regulated in Law 40/2015, of October 1, on the Legal Regime of the Public Sector. Unlike other countries, in Spain only the executive branch has agencies and any need of any of the other branches is covered by the executive.

Types of agencies 
There is not a single definition of what is considered an agency in Spain because, on the one hand, there are three types of public agencies (, literally, public organisms, OP): Autonomous agencies (, OA), public business entities (, EPE) and state agencies (, AE). But, in addition, there are also independent agencies (, literally, independent administrative authorities, AAI).

As far as this article is concerned, public business entities (EPE) are going to be ruled out because, despite being considered public agencies according to legislation, their operation is more similar to that of a public company than to that of an agency itself and may be subordinate to an autonomous agency.

Of the other three types of agency, the main difference between them is the law that regulates them. OAs are governed by common administrative law, while AEs and AAIs are governed by their own creation laws. Autonomous agencies and state agencies have their own legal personality, their own treasury and assets, and autonomy in their management, while the AAIs have their own legal personality, their own assets, but they have independence in their management, not autonomy. The AAIs can be compared to the independent agencies of the United States, since they are independent of the executive branch insofar as they are regulated by their own special legislation that includes special mechanisms to ensure their independence, as is the limitation for the executive branch to appoint and dismiss the high officials of it, with greater control of the legislative branch.

Another important difference is the purpose for which they are created. The autonomous agencies (OA) carry out activities of the Public Administration, both activities of promotion, give benefits, management of public services or production of goods of public interest, as differentiated instrumental organizations and dependent on it. The state agencies (AE) are created to comply with specific policies, with better mechanisms to ensure better management and control of results. Finally, the AAIs are assigned external regulatory or supervisory functions over economic sectors or specific activities that require functional independence or special autonomy from the executive branch.

There is a fourth and exceptional category of agencies. These are the management entities and common services of the Social Security, regulated in the Social Security Act of 2015.

Ministry of Foreign Affairs

Secretariat of State for International Cooperation 

 Spanish Agency for International Development Cooperation (AECID)
 Instituto Cervantes

Source:

Ministry of Justice

Secretariat of State for Justice 

 Center for Legal Studies (CEJ)
 General Mutual Benefit Society for Civil Servants of the Administration of Justice (MUGEJU)

Source:

Ministry of Defence 

 National Intelligence Centre (CNI)
 Spanish Space Agency (AEE), which also depends on the Ministry of Science.

Secretariat of State for Defence 

 National Institute for Aerospace Technology (INTA)
 Institute for Housing, Infrastructure and Equipment of the Defense (INVIED)

Undersecretariat of Defence 

 Social Institute of the Armed Forces (ISFAS)

Source:

Ministry of Finance and Civil Service

Secretariat of State for Finance 

 Spanish Tax Agency (AEAT)
 Institute of Fiscal Studies (IEF)

Secretariat of State for the Civil Service 

 General Mutual Benefit Society of State Civil Servants (MUFACE)
 National Institute of Public Administration (INAP)

Undersecretariat of Finance and Civil Service 

 Commissioner for the Tobacco Market (CMT)
 Royal Mint of Spain (FNMT-RCM)
 State Vehicle Fleet (PME).

Source:

Ministry of the Interior

Secretariat of State for Security 

 State Security Infrastructure and Equipment Office (GIESE)

Directorate-General of the Police 

 National Police Training University Center (CUFPN)

Undersecretariat of the Interior 

 Central Traffic Headquarters (JCT)

Source:

Ministry of Transport, Mobility and Urban Agenda

Secretariat of State for Transport, Mobility and Urban Agenda 

 Centre for Public Works Studies and Experimentation (CEDEX)

General Secretariat for Infraestructure 

 Railway Safety Agency (AESF)

General Secretariat for Transport and Mobility 

 Spanish Aviation Safety and Security Agency (AESA)

Undersecretariat of Transport, Mobility and Urban Agenda 

 National Geographic Information Centre (CNIG)

Source:

Ministry of Education and Vocational Training 

This Department has no agencies attached.

Ministry of Labour and Social Economy

Secretariat of State for Labour and Social Economy 

 Labour and Social Security Inspectorate (ITSS)
 Public State Service for Employment (SEPE)
 Salary Guarantee Fund (FOGASA)
 National Institute for Safety and Health at Work (INSST)

Source:

Ministry of Industry, Trade and Tourism

Secretariat of State for Tourism 

 Tourism Institute of Spain (TURESPAÑA)

General Secretariat for Industry and Small and Medium Enterprises 

 Spanish Metrology Centre (CEM)

Undersecretariat of Industry, Trade and Tourism 

 Spanish Patent and Trademark Office (OEPM)

Source:

Ministry of Agriculture, Fisheries and Food

General Secretariat for Agriculture and Food 

 Spanish Agricultural Guarantee Fund (FEGA)
 Food Information and Control Agency (AICA)

Undersecretariat of Agriculture, Fisheries and Food 

 National Agency for Agricultural Insurance (ENESA)

Source:

Ministry of the Presidency, Relations with the Cortes and Democratic Memory 

 Centre for Political and Constitutional Studies (CEPC)
 Centre for Sociological Research (CIS)
 Patrimonio Nacional

Undersecretariat of the Presidency, Relations with the Cortes and Democratic Memory 

 Official State Gazette (BOE)

Source:

Ministry of Territorial Policy 
This Department has no agencies attached.

Ministry for the Ecological Transition and the Demographic Challenge

Secretariat of State for Energy 

 Institute for Just Transition (ITJ)

Secretariat of State for Environment 

 State Meteorological Agency (AEMET)
 National Parks Autonomous Agency (OAPN)

Directorate-General for Water 

 Commonwealth of the Taibilla Channels (MCT)
 Cantabrian Hydrographic Confederation
 Duero Hydrographic Confederation
 Ebro Hydrographic Confederation
 Guadalquivir Hydrographic Confederation
 Guadiana Hydrographic Confederation
 Júcar Hydrographic Confederation
 Miño-Sil Hydrographic Confederation
 Segura Hydrographic Confederation
 Tajo Hydrographic Confederation

Source:

Ministry of Culture and Sport 

 National Sports Council (CSD)
 Spanish Anti-Doping Agency (CELAD)
 Museo Nacional del Prado
 Museo Nacional Centro de Arte Reina Sofía
 Biblioteca Nacional de España (BNE)

General Secretariat for Culture and Sport 

 National Institute of Performing Arts and Music (INAEM)
 Institute of Cinematography and Audiovisual Arts (ICAA)
 Culture Infrastructure and Equipment Office (GIEC)

Source:

Ministry of Economic Affairs and Digital Transformation

Secretariat of State for Economy and Business Support 

 National Statistics Institute (INE)
 Institute for Accounting and Accounts Audit (ICAC)
 Spanish Agency for the Supervision of Artificial Intelligence (AESIA)

Source:

Ministry of Health

Secretariat of State for Health 

 Spanish Agency of Medicines and Medical Devices (AEMPS)
 National Institute of Health Management (INGESA)
 National Transplant Organization (ONT)
Source:

Ministry of Social Rights and 2030 Agenda 

 Royal Board on Disability (RPD)

Secretariat of State for Social Rights 

 Institute for the Elderly and Social Services (IMSERSO)
 Institute of Youth (INJUVE)

Source:

Ministry of Science and Innovation 

 Spanish Space Agency (AEE), which also depends on the Ministry of Defence.

General Secretariat for Research 

 State Research Agency (AEI)
 Spanish National Research Council (CSIC)
 Carlos III Health Institute (ISCIII)
 Center for Energy, Environmental and Technological Research (CIEMAT)

Source:

Ministry of Equality

Secretariat of State for Equality and against Gender Violence 

 Institute of Women

Source:

Ministry of Consumer Affairs

General Secretariat for Consumer Affairs and Gambling 

 Spanish Agency for Food Safety and Nutrition (AESAN)

Source:

Ministry of Inclusion, Social Security and Migration

Secretariat of State for Social Security and Pensions 

 National Institute for Social Security
 Social Institute for Sea Workers
 Social Security General Treasury
 Social Security IT Department
 Legal Service of the Social Security Administration

Source:

Ministry of Universities

General Secretariat for Universities 

 Menéndez Pelayo International University (UIMP)
 National Agency for Quality Assessment and Accreditation (ANECA)
 Spanish Service for the Internationalization of Education (SEPIE)

Source:

Independent agencies 
The independent agencies or independent administrative authorities (AAI) are independent from the executive branch but relate to different government departments for budget allocation purposes.

Ministry of Finance and Civil Service 

 Independent Authority for Fiscal Responsibility (AIReF)
 Transparency and Good Governance Council (CTBG)

Ministry of Justice 

 Spanish Data Protection Agency (AEPD)

Ministry for the Ecological Transition and Demographic Challenge 

 Nuclear Safety Council (CSN)

Ministry of Economic Affairs and Digital Transformation 

 National Commission on Markets and Competition (CNMC)
 National Securities Market Commission (CNMV)

References 

Government agencies of Spain