Rajoy's second government was composed mainly by members of the PP, as well as 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.