Second government of Mariano Rajoy

The second government of Mariano Rajoy was formed on 4 November 2016, following the latter's election as Prime Minister of Spain by the Congress of Deputies on 29 October and his swearing-in on 31 October, as a result of the People's Party (PP) emerging as the largest parliamentary force at the 2016 Spanish general election. It succeeded the first Rajoy government and was the Government of Spain from 4 November 2016 to 7 June 2018, a total of 8484 days days, or 1 year, 7 months, 5 days.

The cabinet comprised members of the PP and a number of independents. It was dismissed on 1 June 2018 when a motion of no confidence against Rajoy succeeded, but remained in acting capacity until Pedro Sánchez's government was sworn in.

Cabinet changes
The only cabinet change of Rajoy's second government took place on 8 March 2018, when Luis de Guindos stepped down as Minister of Economy, Industry and Competitiveness in order to become Vice President of the European Central Bank. He was succeeded by Román Escolano.

Council of Ministers
The Council of Ministers was structured into the offices for the prime minister, the deputy prime minister, 13 ministries and the post of the spokesperson of the Government.

{| class="wikitable" ! Portfolio ! Name ! width="100px" colspan="2"| Party ! width="135px"| Took office ! width="135px"| Left office ! Ref.
 * colspan="7" bgcolor="#F2F2F2" align="center"| ← Rajoy II Government → (4 November 2016 – 7 June 2018)
 * colspan="7" bgcolor="#F2F2F2" align="center"| ← Rajoy II Government → (4 November 2016 – 7 June 2018)
 * Prime Minister
 * Mariano Rajoy
 * width="1" style="background-color:;"|
 * PP
 * 31 October 2016
 * 1 June 2018
 * align="center"|
 * colspan="7"|
 * Deputy Prime Minister Minister of the Presidency and for Territorial Administrations
 * Soraya Sáenz de Santamaría
 * style="background-color:;"|
 * PP
 * 4 November 2016
 * 7 June 2018
 * align="center"|
 * Minister of Foreign Affairs and Cooperation
 * Alfonso Dastis
 * style="background-color:;"|
 * PP (Ind.)
 * 4 November 2016
 * 7 June 2018
 * align="center"|
 * Minister of Justice
 * Rafael Catalá
 * style="background-color:;"|
 * PP
 * 4 November 2016
 * 7 June 2018
 * align="center"|
 * Minister of Defence
 * María Dolores de Cospedal
 * style="background-color:;"|
 * PP
 * 4 November 2016
 * 7 June 2018
 * align="center"|
 * Minister of Finance and Civil Service
 * Cristóbal Montoro
 * style="background-color:;"|
 * PP
 * 4 November 2016
 * 7 June 2018
 * align="center"|
 * Minister of the Interior
 * Juan Ignacio Zoido
 * style="background-color:;"|
 * PP
 * 4 November 2016
 * 7 June 2018
 * align="center"|
 * Minister of Development
 * Íñigo de la Serna
 * style="background-color:;"|
 * PP
 * 4 November 2016
 * 7 June 2018
 * align="center"|
 * Minister of Education, Culture and Sports Spokesperson of the Government
 * Íñigo Méndez de Vigo
 * style="background-color:;"|
 * PP
 * 4 November 2016
 * 7 June 2018
 * align="center"|
 * Minister of Employment and Social Security
 * Fátima Báñez
 * style="background-color:;"|
 * PP
 * 4 November 2016
 * 7 June 2018
 * align="center"|
 * Minister of Energy, Tourism and Digital Agenda
 * Álvaro Nadal
 * style="background-color:;"|
 * PP
 * 4 November 2016
 * 7 June 2018
 * align="center"|
 * Minister of Agriculture and Fisheries, Food and Environment
 * Isabel García Tejerina
 * style="background-color:;"|
 * PP
 * 4 November 2016
 * 7 June 2018
 * align="center"|
 * Minister of Economy, Industry and Competitiveness
 * Luis de Guindos
 * style="background-color:;"|
 * PP (Ind.)
 * 4 November 2016
 * 8 March 2018
 * align="center"|
 * Minister of Health, Social Services and Equality
 * Dolors Montserrat
 * style="background-color:;"|
 * PP
 * 4 November 2016
 * 7 June 2018
 * align="center"|
 * colspan="7"|
 * Luis de Guindos
 * style="background-color:;"|
 * PP (Ind.)
 * 4 November 2016
 * 8 March 2018
 * align="center"|
 * Minister of Health, Social Services and Equality
 * Dolors Montserrat
 * style="background-color:;"|
 * PP
 * 4 November 2016
 * 7 June 2018
 * align="center"|
 * colspan="7"|
 * colspan="7"|
 * colspan="7"|

Changes March 2018
! Portfolio ! Name ! colspan="2"| Party ! Took office ! Left office ! Ref.
 * Minister of Economy, Industry and Competitiveness
 * Román Escolano
 * style="background-color:;"|
 * PP (Ind.)
 * 8 March 2018
 * 7 June 2018
 * align="center"|
 * }
 * }

Departmental structure
Mariano Rajoy's second government was organised into several superior and governing units, whose number, powers and hierarchical structure varied depending on the ministerial department.


 * Unit/body rank
 * Secretary of state
 * Undersecretary
 * Director-general
 * Autonomous agency
 * Military & intelligence agency

{| class="wikitable" style="line-height:18px;" ! scope="col"| Office (Original name) ! scope="col"| Portrait ! scope="col"| Name ! scope="col"| Took office ! scope="col"| Left office ! colspan="3" scope="col"| Alliance/party ! Ref. ! colspan="9"|

Prime Minister's Office

 * align="center" rowspan="2" width="250"| Prime Minister (Presidencia del Gobierno)
 * width="80"| Mariano Rajoy 2018b (cropped).jpg
 * width="200"| Mariano Rajoy
 * width="200"| 31 October 2016
 * width="200"| 1 June 2018 (censored)
 * width="1" style="background-color:;"|
 * width="1" style="background-color:;"|
 * width="175" align="center"| PP
 * align="center" rowspan="2"|
 * colspan="7"|
 * colspan="7"|
 * colspan="7"|

! colspan="9"|
 * align="center" rowspan="2"| Deputy Prime Minister (Vicepresidencia del Gobierno)
 * Soraya Sáenz de Santamaría 2017 (cropped).jpg
 * Soraya Sáenz de Santamaría
 * 4 November 2016
 * 7 June 2018
 * style="background-color:;"|
 * style="background-color:;"|
 * align="center"| PP
 * align="center" rowspan="2"|
 * colspan="7"| See Ministry of the Presidency and for Territorial Administrations
 * colspan="7"| See Ministry of the Presidency and for Territorial Administrations
 * colspan="7"| See Ministry of the Presidency and for Territorial Administrations

Ministry of Foreign Affairs and Cooperation

 * align="center" rowspan="2"| Ministry of Foreign Affairs and Cooperation (Ministerio de Asuntos Exteriores y de Cooperación)
 * Alfonso Dastis 2016b (cropped).jpg
 * Alfonso Dastis
 * 4 November 2016
 * 7 June 2018
 * style="background-color:;"|
 * style="background-color:;"|
 * align="center"| PP (Independent)
 * align="center" rowspan="2"|
 * colspan="7"|
 * colspan="7"|
 * colspan="7"|

! colspan="9"|

Ministry of Justice

 * align="center" rowspan="2"| Ministry of Justice (Ministerio de Justicia)
 * Rafael Catalá 2018 (cropped).jpg
 * Rafael Catalá
 * 4 November 2016
 * 7 June 2018
 * style="background-color:;"|
 * style="background-color:;"|
 * align="center"| PP
 * align="center" rowspan="2"|
 * colspan="7"|
 * colspan="7"|
 * colspan="7"|

! colspan="9"|

Ministry of Defence

 * align="center" rowspan="2"| Ministry of Defence (Ministerio de Defensa)
 * María Dolores de Cospedal 2017 (cropped).jpg
 * María Dolores de Cospedal
 * 4 November 2016
 * 7 June 2018
 * style="background-color:;"|
 * style="background-color:;"|
 * align="center"| PP
 * align="center" rowspan="2"|
 * colspan="7"|
 * colspan="7"|
 * colspan="7"|

! colspan="9"|

Ministry of Finance and Civil Service

 * align="center" rowspan="2"| Ministry of Finance and Civil Service (Ministerio de Hacienda y Función Pública)
 * Cristóbal Montoro 2015b (cropped).jpg
 * Cristóbal Montoro
 * 4 November 2016
 * 7 June 2018
 * style="background-color:;"|
 * style="background-color:;"|
 * align="center"| PP
 * align="center" rowspan="2"|
 * colspan="7"|
 * colspan="7"|
 * colspan="7"|

! colspan="9"|

Ministry of the Interior

 * align="center" rowspan="2"| Ministry of the Interior (Ministerio del Interior)
 * Juan Ignacio Zoido 2017b (cropped).jpg
 * Juan Ignacio Zoido
 * 4 November 2016
 * 7 June 2018
 * style="background-color:;"|
 * style="background-color:;"|
 * align="center"| PP
 * align="center" rowspan="2"|
 * colspan="7"|
 * colspan="7"|
 * colspan="7"|

! colspan="9"|

Ministry of Development

 * align="center" rowspan="2"| Ministry of Development (Ministerio de Fomento)
 * Íñigo de la Serna 2017c (cropped).jpg
 * Íñigo de la Serna
 * 4 November 2016
 * 7 June 2018
 * style="background-color:;"|
 * style="background-color:;"|
 * align="center"| PP
 * align="center" rowspan="2"|
 * colspan="7"|
 * colspan="7"|
 * colspan="7"|

! colspan="9"|

Ministry of Education, Culture and Sports

 * align="center" rowspan="2"| Ministry of Education, Culture and Sports (Ministerio de Educación, Cultura y Deporte)
 * Iñigo Mendez de Vigob (cropped).jpg
 * Íñigo Méndez de Vigo
 * 4 November 2016
 * 7 June 2018
 * style="background-color:;"|
 * style="background-color:;"|
 * align="center"| PP
 * align="center" rowspan="2"|
 * colspan="7"|
 * colspan="7"|
 * colspan="7"|

! colspan="9"|

Ministry of Employment and Social Security

 * align="center" rowspan="2"| Ministry of Employment and Social Security (Ministerio de Empleo y Seguridad Social)
 * Fátima Báñez 2017b (cropped).jpg
 * Fátima Báñez
 * 4 November 2016
 * 7 June 2018
 * style="background-color:;"|
 * style="background-color:;"|
 * align="center"| PP
 * align="center" rowspan="2"|
 * colspan="7"|
 * colspan="7"|
 * colspan="7"|

! colspan="9"|

Ministry of Energy, Tourism and Digital Agenda

 * align="center" rowspan="2"| Ministry of Energy, Tourism and Digital Agenda (Ministerio de Energía, Turismo y Agenda Digital)
 * Álvaro Nadal 2017b (cropped).jpg
 * Álvaro Nadal
 * 4 November 2016
 * 7 June 2018
 * style="background-color:;"|
 * style="background-color:;"|
 * align="center"| PP
 * align="center" rowspan="2"|
 * colspan="7"|
 * colspan="7"|
 * colspan="7"|

! colspan="9"|

Ministry of Agriculture and Fisheries, Food and Environment

 * align="center" rowspan="2"| Ministry of Agriculture and Fisheries, Food and Environment (Ministerio de Agricultura y Pesca, Alimentación y Medio Ambiente)
 * Isabel García Tejerina 2017b (cropped).jpg
 * Isabel García Tejerina
 * 4 November 2016
 * 7 June 2018
 * style="background-color:;"|
 * style="background-color:;"|
 * align="center"| PP
 * align="center" rowspan="2"|
 * colspan="7"|
 * colspan="7"|
 * colspan="7"|

! colspan="9"|

Ministry of the Presidency and for Territorial Administrations

 * align="center" rowspan="2"| Ministry of the Presidency and for Territorial Administrations (Ministerio de la Presidencia y para las Administraciones Territoriales)
 * Soraya Sáenz de Santamaría 2017 (cropped).jpg
 * Soraya Sáenz de Santamaría
 * 4 November 2016
 * 7 June 2018
 * style="background-color:;"|
 * style="background-color:;"|
 * align="center"| PP
 * align="center" rowspan="2"|
 * colspan="7"|
 * colspan="7"|
 * colspan="7"|

! colspan="9"|

Ministry of Economy, Industry and Competitiveness

 * align="center" rowspan="3"| Ministry of Economy, Industry and Competitiveness (Ministerio de Economía, Industria y Competitividad)
 * Luis de Guindos 2017b (cropped).jpg
 * Luis de Guindos
 * 4 November 2016
 * 8 March 2018
 * style="background-color:;"|
 * style="background-color:;"|
 * align="center"| PP (Independent)
 * align="center" rowspan="3"|
 * Román Escolano 2018 (cropped).jpg
 * Román Escolano
 * 8 March 2018
 * 7 June 2018
 * style="background-color:;"|
 * style="background-color:;"|
 * align="center"| PP (Independent)
 * colspan="7"|
 * align="center"| PP (Independent)
 * colspan="7"|
 * colspan="7"|

! colspan="9"|

Ministry of Health, Social Services and Equality

 * align="center" rowspan="2"| Ministry of Health, Social Services and Equality (Ministerio de Sanidad, Servicios Sociales e Igualdad)
 * Dolors Montserrat 2018 (cropped).jpg
 * Dolors Montserrat
 * 4 November 2016
 * 7 June 2018
 * style="background-color:;"|
 * style="background-color:;"|
 * align="center"| PP
 * align="center" rowspan="2"|
 * colspan="7"|
 * colspan="7"|
 * colspan="7"|

! colspan="9"|

Spokesperson of the Government

 * align="center"| Spokesperson of the Government (Portavoz del Gobierno)
 * Iñigo Mendez de Vigob (cropped).jpg
 * Íñigo Méndez de Vigo
 * 4 November 2016
 * 7 June 2018
 * style="background-color:;"|
 * style="background-color:;"|
 * align="center"| PP
 * align="center"|
 * }
 * }