In June 2018, it was announced that Ribera would be the Minister for the Ecological Transition of the Sánchez government, following the motion of censure that the PSOE presented against the previous government of Mariano Rajoy (PP) and that was approved by the Congress of Deputies. On 1 June 2018, Sánchez appointed her as Minister in new Spanish government. Felipe VI sanctioned by royal decree of June her appointment as holder of the portfolio of Minister for the Ecological Transition. On 7 June she took office as Minister before the King at Palace of Zarzuela.