On 24 May 2018, the National Court found that the PP profited from the illegal kickbacks-for-contracts scheme of the Gürtel case, confirming the existence of an illegal accounting and financing structure that ran in parallel with the party's official one since the party's foundation in 1989 and ruling that the PP helped establish "a genuine and effective system of institutional corruption through the manipulation of central, autonomous and local public procurement". This prompted a no confidence vote on Mariano Rajoy's government, which was brought down on 1 June 2018 in the first successful motion since the Spanish transition to democracy. On 5 June 2018, Rajoy announced his resignation as PP leader. On 21 July 2018 Pablo Casado was elected as the new leader of the PP; under his leadership, the party took a strong right-wing turn, even forging local alliances with the far-right Vox party.